Interface SearchResultEntry
- All Superinterfaces:
Entry
,ProtocolOp
,Response
Each entry returned in a Search Result Entry will contain all appropriate attributes as specified in the Search request, subject to access control and other administrative policy.
Note that a Search Result Entry may hold zero attributes. This may happen when none of the attributes of an entry were requested or could be returned.
Note also that each returned attribute may hold zero attribute values. This may happen when only attribute types are requested, access controls prevent the return of values, or other reasons.
-
Method Summary
Modifier and TypeMethodDescriptiondefault SearchResultEntry
addAttribute
(String attributeDescription, Object... values) Ensures that this entry contains the provided attribute and values (optional operation).default SearchResultEntry
addControl
(Control control) Adds the provided control to this protocol-op.default SearchResultEntry
addControls
(Iterable<? extends Control> controls) Adds the provided controls to this protocol-op.default SearchResultEntry
Removes all the attributes from this entry (optional operation).default SearchResultEntry
removeAttribute
(String attributeDescription, Object... values) Removes all of the attribute values contained invalues
from the named attribute in this entry if it is present (optional operation).default SearchResultEntry
removeControls
(String oid) Removes all the controls having the specified OID.default SearchResultEntry
replaceAttribute
(String attributeDescription, Object... values) Adds all of the attribute values contained invalues
to this entry, replacing any existing attribute values (optional operation).default SearchResultEntry
Sets the distinguished name of this entry (optional operation).default SearchResultEntry
Sets the distinguished name of this entry (optional operation).Methods inherited from interface org.forgerock.opendj.ldap.Entry
addAttribute, addAttribute, addAttributeIfAbsent, containsAnyAttributes, containsAnyAttributes, containsAttribute, containsAttribute, containsAttribute, equals, getAllAttributes, getAllAttributes, getAllAttributes, getAttribute, getAttribute, getAttributeCount, getName, hashCode, mergeAttribute, parseAttribute, parseAttribute, removeAttribute, removeAttribute, replaceAttribute, toString
Methods inherited from interface org.forgerock.opendj.ldap.messages.ProtocolOp
containsControl, getControl, getControl, getControls
-
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.
The attribute description will be decoded using the schema associated with this entry (usually the default schema).
Any attribute values which are not instances of
ByteString
will be converted using theByteString.valueOfObject(Object)
method.NOTE: When
attribute
is non-empty, this method implements LDAP Modify add semantics.- Specified by:
addAttribute
in interfaceEntry
- Parameters:
attributeDescription
- The name of the attribute whose values are to be added.values
- The attribute values to be added to this entry, merging any existing attribute values.- Returns:
- This entry.
- If this entry does not already contain an attribute with a
-
addControl
Description copied from interface:ProtocolOp
Adds the provided control to this protocol-op.- Specified by:
addControl
in interfaceProtocolOp
- Specified by:
addControl
in interfaceResponse
- Parameters:
control
- The control to be added to this protocol-op.- Returns:
- This protocol-op.
-
addControls
Description copied from interface:ProtocolOp
Adds the provided controls to this protocol-op.- Specified by:
addControls
in interfaceProtocolOp
- Specified by:
addControls
in interfaceResponse
- Parameters:
controls
- The controls to be added to this protocol-op.- Returns:
- This protocol-op.
-
removeControls
Description copied from interface:ProtocolOp
Removes all the controls having the specified OID.- Specified by:
removeControls
in interfaceProtocolOp
- Specified by:
removeControls
in interfaceResponse
- Parameters:
oid
- The numeric OID of the protocol-op control to remove.- Returns:
- This protocol-op.
-
clearAttributes
Description copied from interface:Entry
Removes all the attributes from this entry (optional operation).- Specified by:
clearAttributes
in interfaceEntry
- Returns:
- This entry.
-
removeAttribute
Description copied from interface:Entry
Removes all of the attribute values contained invalues
from the named attribute in this entry if it is present (optional operation). Ifvalues
isnull
or empty then the entire attribute will be removed if it is present.The attribute description will be decoded using the schema associated with this entry (usually the default schema).
Any attribute values which are not instances of
ByteString
will be converted using theByteString.valueOfObject(Object)
method.NOTE: This method implements LDAP Modify delete semantics.
- Specified by:
removeAttribute
in interfaceEntry
- Parameters:
attributeDescription
- The name of the attribute whose values are to be removed.values
- The attribute values to be removed from this entry, which may benull
or empty if the entire attribute is to be removed.- Returns:
- This entry.
-
replaceAttribute
Description copied from interface:Entry
Adds all of the attribute values contained invalues
to this entry, replacing any existing attribute values (optional operation). Ifvalues
isnull
or empty then the entire attribute will be removed if it is present.The attribute description will be decoded using the schema associated with this entry (usually the default schema).
Any attribute values which are not instances of
ByteString
will be converted using theByteString.valueOfObject(Object)
method.NOTE: This method implements LDAP Modify replace semantics as described in RFC 4511 - Section 4.6. Modify Operation.
- Specified by:
replaceAttribute
in interfaceEntry
- Parameters:
attributeDescription
- The name of the attribute whose values are to be replaced.values
- The attribute values to be added to this entry, replacing any existing attribute values, and which may benull
or empty if the entire attribute is to be removed.- Returns:
- This entry.
-
setName
Description copied from interface:Entry
Sets the distinguished name of this entry (optional operation). -
setName
Description copied from interface:Entry
Sets the distinguished name of this entry (optional operation).The distinguished name will be decoded using the schema associated with this entry (usually the default schema).
-