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.Object
Represents 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 boolean
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this reference.Module
getCollection()
Gets the collection to which this reference belongs.abstract int
hashCode()
Returns a hash code value for the object.
-
-
-
Constructor Detail
-
BaseRef
public BaseRef(Module coll)
Constructs a newBaseRef
object 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
Module
representing 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:
equals
in classjava.lang.Object
- Parameters:
o
- the reference object with which to compare.- Returns:
true
if this reference is the same as the object argument;false
otherwise.
-
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:
hashCode
in classjava.lang.Object
- Returns:
- a hash code value for this reference.
-
-