Class Guid


  • public class Guid
    extends Object
    This class represents an LDAP entry and it provides access to the ID (dn) and GUID of the given name. Every persistent object (that is, entry in the Directory server) has a GUID (Globally Unique Identifier) associated with it. Upon doing a getGuid() (getGuid() is a method in the PersistentObject class) on an LDAP entry, this GUID object would be returned (not a DN string or a guid in the LDAP sense). Methods of the Guid object could then be used to get the actual DN, etc.
    • Constructor Summary

      Constructors 
      Constructor Description
      Guid​(long id)
      Constructs a Guid object from the specified unique ID.
      Guid​(String dn)
      Constructs a Guid object from the specified distinguished name.
      Guid​(String dn, long id)
      Constructs a Guid object from the specified distinguished name and unique ID.
    • Constructor Detail

      • Guid

        public Guid​(String dn)
        Constructs a Guid object from the specified distinguished name.
        Parameters:
        dn - string representation of the distinguished name
      • Guid

        public Guid​(long id)
        Constructs a Guid object from the specified unique ID.
        Parameters:
        id - unique ID
      • Guid

        public Guid​(String dn,
                    long id)
        Constructs a Guid object from the specified distinguished name and unique ID.
        Parameters:
        dn - string representation of the distinguished name
        id - unique ID
    • Method Detail

      • getDn

        public String getDn()
        Returns the string representation of the distinguished name.
        Returns:
        the string representation of the distinguished name
      • setDn

        protected void setDn​(String dn)
        Sets the dn for this object. Note that the value is not persisted in LDAP.
        Parameters:
        dn - string representation of the distinguished name
      • getId

        public long getId()
        Returns the nsuniqueID name in the Guid object associated with an LDAP entry.
        Returns:
        the nsuniqueID name in the Guid object associated with an LDAP entry
      • setId

        protected void setId​(long id)
        Sets the nsuniqueID name in the Guid object associated with an LDAP entry Note that the value is not persisted in LDAP.
        Parameters:
        id - the nsuniqueID name
      • equals

        public boolean equals​(Guid guid)
        Determines if the current Guid is equal to the specified Guid.
        Parameters:
        guid - Guid to compare against the current Guid
        Returns:
        true if the two Guids are the same
      • toString

        public String toString()
        Returns the String form of this Guid object.
        Overrides:
        toString in class Object
        Returns:
        the string representation of the Guid