Package org.forgerock.opendj.ldap
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
AnEntrywhich implements the null object pattern.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAttribute(Attribute attribute, Collection<? super ByteString> duplicateValues)Ensures that this entry contains the provided attribute and values (optional operation).EntryclearAttributes()Removes all the attributes from this entry (optional operation).Iterable<Attribute>getAllAttributes()Returns anIterablecontaining all of the attributes in this entry.intgetAttributeCount()Returns the number of attributes in this entry.DngetName()Returns the distinguished name of this entry.EntrysetName(Dn dn)Sets the distinguished name of this entry (optional operation).-
Methods inherited from class org.forgerock.opendj.ldap.AbstractEntry
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.forgerock.opendj.ldap.Entry
addAttribute, addAttribute, addAttributeIfAbsent, containsAnyAttributes, containsAnyAttributes, containsAttribute, containsAttribute, containsAttribute, getAllAttributes, getAllAttributes, getAttribute, getAttribute, mergeAttribute, parseAttribute, parseAttribute, removeAttribute, removeAttribute, removeAttribute, replaceAttribute, replaceAttribute, setName
-
-
-
-
Method Detail
-
addAttribute
public boolean addAttribute(Attribute attribute, Collection<? super ByteString> duplicateValues)
Description copied from interface:EntryEnsures 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
matchingattribute description, then this entry will be modified such that it containsattribute, even if it is empty. - If this entry already contains an attribute with a
matchingattribute description, then the attribute values contained inattributewill be merged with the existing attribute values.
NOTE: When
attributeis 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, ornullif duplicate values should not be saved.- Returns:
trueif this entry changed as a result of this call.
- If this entry does not already contain an attribute with a
-
clearAttributes
public Entry clearAttributes()
Description copied from interface:EntryRemoves all the attributes from this entry (optional operation).- Returns:
- This entry.
-
getAllAttributes
public Iterable<Attribute> getAllAttributes()
Description copied from interface:EntryReturns anIterablecontaining all of the attributes in this entry. The returnedIterablemay be used to remove attributes if permitted by this entry.- Returns:
- An
Iterablecontaining all of the attributes.
-
getAttributeCount
public int getAttributeCount()
Description copied from interface:EntryReturns the number of attributes in this entry.- Returns:
- The number of attributes.
-
getName
public Dn getName()
Description copied from interface:EntryReturns the distinguished name of this entry.- Returns:
- The distinguished name of this entry.
-
-