Class 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 new DocumentRef 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 java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DocumentRef

        public DocumentRef​(java.lang.String id,
                           Module coll)
        Constructs a new DocumentRef 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.
        Specified by:
        equals in class BaseRef
        Parameters:
        o - The object to compare with this document reference for equality.
        Returns:
        true if the specified object is equal to this document reference; otherwise, false.
      • hashCode

        public int hashCode()
        Returns a hash code value for this document reference based on its ID and collection.
        Specified by:
        hashCode in class BaseRef
        Returns:
        An integer hash code for this document reference.