Package com.mongodb
Class DBRef
- java.lang.Object
-
- com.mongodb.DBRef
-
- All Implemented Interfaces:
java.io.Serializable
@Deprecated(since="2021-05-27") public class DBRef extends java.lang.Object implements java.io.SerializableDeprecated.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(java.lang.Object o)Deprecated.java.lang.StringgetCollectionName()Deprecated.Gets the name of the collection in which the referenced document is stored.java.lang.StringgetDatabaseName()Deprecated.Gets the name of the database in which the referenced document is stored.java.lang.ObjectgetId()Deprecated.Gets the _id of the referenced documentinthashCode()Deprecated.java.lang.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
DBRef
public DBRef(java.lang.String collectionName, java.lang.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 java.lang.String databaseName, java.lang.String collectionName, java.lang.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 java.lang.Object getId()
Deprecated.Gets the _id of the referenced document- Returns:
- the _id of the referenced document
-
getCollectionName
public java.lang.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 java.lang.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
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-