Class ReferenceResolver.ReferenceCollection
java.lang.Object
org.springframework.data.mongodb.core.convert.ReferenceResolver.ReferenceCollection
- Enclosing interface:
- ReferenceResolver
ReferenceResolver.ReferenceCollection
is a value object that contains information about the target database and collection
name of an association.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromDBRef
(com.mongodb.DBRef dbRef) Create a new instance ofReferenceResolver.ReferenceCollection
from the givenDBRef
.Get the target collection name.Get the target database name.
-
Constructor Details
-
ReferenceCollection
- Parameters:
database
- can be null to indicate the configured defaultdatabase
should be used.collection
- the target collection name. Must not be null.
-
-
Method Details
-
fromDBRef
Create a new instance ofReferenceResolver.ReferenceCollection
from the givenDBRef
.- Parameters:
dbRef
- must not be null.- Returns:
- new instance of
ReferenceResolver.ReferenceCollection
.
-
getCollection
Get the target collection name.- Returns:
- never null.
-
getDatabase
Get the target database name. If null the default database should be used.- Returns:
- can be null.
-