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

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

      • NamedDocumentRef

        public NamedDocumentRef​(java.lang.String name,
                                Module coll)
        Constructs a new NamedDocumentRef 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.
        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 name and collection.
        Specified by:
        hashCode in class BaseRef
        Returns:
        An integer hash code for this document reference.