Package com.fauna.types
Class DocumentRef
- java.lang.Object
-
- com.fauna.types.BaseRef
-
- com.fauna.types.DocumentRef
-
public final class DocumentRef extends BaseRef
Represents a reference to a specific document within a collection. This class provides a unique identifier for the document and references the collection to which it belongs.
-
-
Constructor Summary
Constructors Constructor Description DocumentRef(java.lang.String id, Module coll)
Constructs a newDocumentRef
object with the specified ID and collection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Checks if this document reference is equal to another object.java.lang.String
getId()
Gets the unique identifier of the document reference.int
hashCode()
Returns a hash code value for this document reference based on its ID and collection.-
Methods inherited from class com.fauna.types.BaseRef
getCollection
-
-
-
-
Constructor Detail
-
DocumentRef
public DocumentRef(java.lang.String id, Module coll)
Constructs a newDocumentRef
object with the specified ID and collection.- Parameters:
id
- The unique string identifier of the document reference.coll
- The module (collection) to which the document reference belongs.
-
-
Method Detail
-
getId
public java.lang.String getId()
Gets the unique identifier of the document reference.- Returns:
- A
String
representing the document reference ID.
-
equals
public boolean equals(java.lang.Object o)
Checks if this document reference is equal to another object. Two document references are considered equal if they have the same ID and belong to the same collection.
-
-