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
An
Entry
which implements the null object pattern.-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAttribute
(Attribute attribute, Collection<? super ByteString> duplicateValues) Ensures that this entry contains the provided attribute and values (optional operation).Removes all the attributes from this entry (optional operation).Returns anIterable
containing all of the attributes in this entry.int
Returns the number of attributes in this entry.getName()
Returns the distinguished name of this entry.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 Details
-
addAttribute
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
Description copied from interface:Entry
Removes all the attributes from this entry (optional operation).- Returns:
- This entry.
-
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
Description copied from interface:Entry
Returns the distinguished name of this entry.- Returns:
- The distinguished name of this entry.
-
setName
Description copied from interface:Entry
Sets the distinguished name of this entry (optional operation).- Parameters:
dn
- The distinguished name.- Returns:
- This entry.
-