Package com.mongodb
Class DBRef
- java.lang.Object
-
- com.mongodb.DBRef
-
- All Implemented Interfaces:
Serializable
@Deprecated(since="2021-05-27") public class DBRef extends Object implements Serializable
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.A representation of a database reference.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object o)Deprecated.StringgetCollectionName()Deprecated.Gets the name of the collection in which the referenced document is stored.StringgetDatabaseName()Deprecated.Gets the name of the database in which the referenced document is stored.ObjectgetId()Deprecated.Gets the _id of the referenced documentinthashCode()Deprecated.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
DBRef
public DBRef(String collectionName, Object id)
Deprecated.Construct an instance.- Parameters:
collectionName- the name of the collection where the document is storedid- the object id
-
DBRef
public DBRef(@Nullable String databaseName, String collectionName, Object id)Deprecated.Construct an instance.- Parameters:
databaseName- the name of the database where the document is storedcollectionName- the name of the collection where the document is storedid- the object id- Since:
- 3.3
-
-
Method Detail
-
getId
public Object getId()
Deprecated.Gets the _id of the referenced document- Returns:
- the _id of the referenced document
-
getCollectionName
public String getCollectionName()
Deprecated.Gets the name of the collection in which the referenced document is stored.- Returns:
- the name of the collection in which the referenced is stored
-
getDatabaseName
@Nullable public String getDatabaseName()
Deprecated.Gets the name of the database in which the referenced document is stored. A null value implies that the referenced document is stored in the same database as the referring document.- Returns:
- the possibly-null database name
- Since:
- 3.3
-
-