public class DBRef
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
collectionName |
private java.lang.String |
databaseName |
private java.lang.Object |
id |
private static long |
serialVersionUID |
Constructor and Description |
---|
DBRef(java.lang.String collectionName,
java.lang.Object id)
Construct an instance.
|
DBRef(java.lang.String databaseName,
java.lang.String collectionName,
java.lang.Object id)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getCollectionName()
Gets the name of the collection in which the referenced document is stored.
|
java.lang.String |
getDatabaseName()
Gets the name of the database in which the referenced document is stored.
|
java.lang.Object |
getId()
Gets the _id of the referenced document
|
int |
hashCode() |
java.lang.String |
toString() |
private static final long serialVersionUID
private final java.lang.Object id
private final java.lang.String collectionName
private final java.lang.String databaseName
public DBRef(java.lang.String collectionName, java.lang.Object id)
collectionName
- the name of the collection where the document is storedid
- the object idpublic DBRef(java.lang.String databaseName, java.lang.String collectionName, java.lang.Object id)
databaseName
- the name of the database where the document is storedcollectionName
- the name of the collection where the document is storedid
- the object idpublic java.lang.Object getId()
public java.lang.String getCollectionName()
public java.lang.String getDatabaseName()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object