Package com.fauna.types
Class NamedDocumentRef
- java.lang.Object
-
- com.fauna.types.BaseRef
-
- com.fauna.types.NamedDocumentRef
-
public final class NamedDocumentRef extends BaseRef
Represents a reference to a document identified by a "name" instead of an "id". This class is used for references to system collection documents where a unique name (e.g., for a Role) is used instead of a numeric or auto-generated ID.
-
-
Constructor Summary
Constructors Constructor Description NamedDocumentRef(java.lang.String name, Module coll)
Constructs a newNamedDocumentRef
object with the specified name 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
getName()
Gets the unique name of the document reference.int
hashCode()
Returns a hash code value for this document reference based on its name and collection.-
Methods inherited from class com.fauna.types.BaseRef
getCollection
-
-
-
-
Constructor Detail
-
NamedDocumentRef
public NamedDocumentRef(java.lang.String name, Module coll)
Constructs a newNamedDocumentRef
object with the specified name and collection.- Parameters:
name
- The unique string name identifying the document reference.coll
- The module (collection) to which the named document reference belongs.
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the unique name of the document reference.- Returns:
- A
String
representing the name of the document reference.
-
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 name and belong to the same collection.
-
-