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
AnEntry
which implements the null object pattern.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAttribute(Attribute attribute, Collection<? super ByteString> duplicateValues)
Ensures that this entry contains the provided attribute and values (optional operation).Entry
clearAttributes()
Removes all the attributes from this entry (optional operation).Iterable<Attribute>
getAllAttributes()
Returns anIterable
containing all of the attributes in this entry.int
getAttributeCount()
Returns the number of attributes in this entry.Dn
getName()
Returns the distinguished name of this entry.Entry
setName(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: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 containsattribute
, even if it is empty. - If this entry already contains an attribute with a
matching
attribute description, then the attribute values contained inattribute
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, ornull
if duplicate values should not be saved.- Returns:
true
if 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:Entry
Removes all the attributes from this entry (optional operation).- Returns:
- This entry.
-
getAllAttributes
public Iterable<Attribute> getAllAttributes()
Description copied from interface:Entry
Returns anIterable
containing all of the attributes in this entry. The returnedIterable
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.
-
-