Interface SearchResultEntry
-
- All Superinterfaces:
Entry,ProtocolOp,Response
public interface SearchResultEntry extends Response, Entry
A Search Result Entry represents an entry found during a Search operation.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
All Methods Instance Methods Default Methods Modifier and Type Method Description default SearchResultEntryaddAttribute(String attributeDescription, Object... values)Ensures that this entry contains the provided attribute and values (optional operation).default SearchResultEntryaddControl(Control control)Adds the provided control to this protocol-op.default SearchResultEntryaddControls(Iterable<? extends Control> controls)Adds the provided controls to this protocol-op.default SearchResultEntryclearAttributes()Removes all the attributes from this entry (optional operation).default SearchResultEntryremoveAttribute(String attributeDescription, Object... values)Removes all of the attribute values contained invaluesfrom the named attribute in this entry if it is present (optional operation).default SearchResultEntryreplaceAttribute(String attributeDescription, Object... values)Adds all of the attribute values contained invaluesto this entry, replacing any existing attribute values (optional operation).default SearchResultEntrysetName(String dn)Sets the distinguished name of this entry (optional operation).default SearchResultEntrysetName(Dn dn)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 Detail
-
addAttribute
default SearchResultEntry addAttribute(String attributeDescription, Object... values)
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.
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
ByteStringwill be converted using theByteString.valueOfObject(Object)method.NOTE: When
attributeis non-empty, this method implements LDAP Modify add semantics.- Specified by:
addAttributein 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
default SearchResultEntry addControl(Control control)
Description copied from interface:ProtocolOpAdds the provided control to this protocol-op.- Specified by:
addControlin interfaceProtocolOp- Specified by:
addControlin interfaceResponse- Parameters:
control- The control to be added to this protocol-op.- Returns:
- This protocol-op.
-
addControls
default SearchResultEntry addControls(Iterable<? extends Control> controls)
Description copied from interface:ProtocolOpAdds the provided controls to this protocol-op.- Specified by:
addControlsin interfaceProtocolOp- Specified by:
addControlsin interfaceResponse- Parameters:
controls- The controls to be added to this protocol-op.- Returns:
- This protocol-op.
-
clearAttributes
default SearchResultEntry clearAttributes()
Description copied from interface:EntryRemoves all the attributes from this entry (optional operation).- Specified by:
clearAttributesin interfaceEntry- Returns:
- This entry.
-
removeAttribute
default SearchResultEntry removeAttribute(String attributeDescription, Object... values)
Description copied from interface:EntryRemoves all of the attribute values contained invaluesfrom the named attribute in this entry if it is present (optional operation). Ifvaluesisnullor 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
ByteStringwill be converted using theByteString.valueOfObject(Object)method.NOTE: This method implements LDAP Modify delete semantics.
- Specified by:
removeAttributein 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 benullor empty if the entire attribute is to be removed.- Returns:
- This entry.
-
replaceAttribute
default SearchResultEntry replaceAttribute(String attributeDescription, Object... values)
Description copied from interface:EntryAdds all of the attribute values contained invaluesto this entry, replacing any existing attribute values (optional operation). Ifvaluesisnullor 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
ByteStringwill 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:
replaceAttributein 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 benullor empty if the entire attribute is to be removed.- Returns:
- This entry.
-
setName
default SearchResultEntry setName(Dn dn)
Description copied from interface:EntrySets the distinguished name of this entry (optional operation).
-
setName
default SearchResultEntry setName(String dn)
Description copied from interface:EntrySets 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).
-
-