Class Entries.NullEntry

java.lang.Object
org.forgerock.opendj.ldap.AbstractEntry
org.forgerock.opendj.ldap.Entries.NullEntry
All Implemented Interfaces:
Entry
Enclosing class:
Entries

public static final class Entries.NullEntry extends AbstractEntry
An Entry which implements the null object pattern.
  • Method Details

    • addAttribute

      public boolean addAttribute(Attribute attribute, Collection<? super ByteString> duplicateValues)
      Description copied from interface: Entry
      Ensures that this entry contains the provided attribute and values (optional operation). This method has the following semantics:
      • If this entry does not already contain an attribute with a matching attribute description, then this entry will be modified such that it contains attribute, even if it is empty.
      • If this entry already contains an attribute with a matching attribute description, then the attribute values contained in attribute will be merged with the existing attribute values.

      NOTE: When attribute is non-empty, this method implements LDAP Modify add semantics.

      Parameters:
      attribute - The attribute values to be added to this entry, merging with any existing attribute values.
      duplicateValues - A collection into which duplicate values will be added, or null if duplicate values should not be saved.
      Returns:
      true if this entry changed as a result of this call.
    • clearAttributes

      public Entry clearAttributes()
      Description copied from interface: Entry
      Removes all the attributes from this entry (optional operation).
      Returns:
      This entry.
    • getAllAttributes

      public Iterable<Attribute> getAllAttributes()
      Description copied from interface: Entry
      Returns an Iterable containing all of the attributes in this entry. The returned Iterable may be used to remove attributes if permitted by this entry.
      Returns:
      An Iterable containing all of the attributes.
    • getAttributeCount

      public int getAttributeCount()
      Description copied from interface: Entry
      Returns the number of attributes in this entry.
      Returns:
      The number of attributes.
    • getName

      public Dn getName()
      Description copied from interface: Entry
      Returns the distinguished name of this entry.
      Returns:
      The distinguished name of this entry.
    • setName

      public Entry setName(Dn dn)
      Description copied from interface: Entry
      Sets the distinguished name of this entry (optional operation).
      Parameters:
      dn - The distinguished name.
      Returns:
      This entry.