Package com.fauna.types
Class BaseRef
- java.lang.Object
-
- com.fauna.types.BaseRef
-
- Direct Known Subclasses:
DocumentRef,NamedDocumentRef
public abstract class BaseRef extends java.lang.ObjectRepresents a reference to a document within a collection. This abstract class serves as a base for specific types of document references, encapsulating the collection to which the reference belongs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanequals(java.lang.Object o)Indicates whether some other object is "equal to" this reference.ModulegetCollection()Gets the collection to which this reference belongs.abstract inthashCode()Returns a hash code value for the object.
-
-
-
Constructor Detail
-
BaseRef
public BaseRef(Module coll)
Constructs a newBaseRefobject with the specified collection.- Parameters:
coll- The module to which the document reference belongs.
-
-
Method Detail
-
getCollection
public Module getCollection()
Gets the collection to which this reference belongs.- Returns:
- The
Modulerepresenting the collection associated with this reference.
-
equals
public abstract boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this reference. This method should be overridden in subclasses to provide specific equality logic.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the reference object with which to compare.- Returns:
trueif this reference is the same as the object argument;falseotherwise.
-
hashCode
public abstract int hashCode()
Returns a hash code value for the object. This method should be overridden in subclasses to provide specific hash code logic.- Overrides:
hashCodein classjava.lang.Object- Returns:
- a hash code value for this reference.
-
-