Package com.unboundid.ldap.sdk
Class SearchResultEntry
java.lang.Object
com.unboundid.ldap.sdk.Entry
com.unboundid.ldap.sdk.ReadOnlyEntry
com.unboundid.ldap.sdk.SearchResultEntry
- All Implemented Interfaces:
LDAPResponse,LDIFRecord,Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class SearchResultEntry
extends ReadOnlyEntry
implements LDAPResponse
This class provides a data structure for representing an LDAP search result
entry. This is a
ReadOnlyEntry object that may also include zero
or more controls included with the entry returned from the server.- See Also:
-
Field Summary
Fields inherited from interface com.unboundid.ldap.protocol.LDAPResponse
NO_CONTROLS -
Constructor Summary
ConstructorsConstructorDescriptionSearchResultEntry(int messageID, Entry entry, Control... controls) Creates a new search result entry from the provided entry.SearchResultEntry(int messageID, String dn, Attribute[] attributes, Control... controls) Creates a new search result entry with the provided information.SearchResultEntry(int messageID, String dn, Schema schema, Attribute[] attributes, Control... controls) Creates a new search result entry with the provided information.SearchResultEntry(int messageID, String dn, Schema schema, Collection<Attribute> attributes, Control... controls) Creates a new search result entry with the provided information.SearchResultEntry(int messageID, String dn, Collection<Attribute> attributes, Control... controls) Creates a new search result entry with the provided information.SearchResultEntry(Entry entry, Control... controls) Creates a new search result entry from the provided entry.SearchResultEntry(String dn, Attribute[] attributes, Control... controls) Creates a new search result entry with the provided information.SearchResultEntry(String dn, Collection<Attribute> attributes, Control... controls) Creates a new search result entry with the provided information. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the provided object is equal to this entry.getControl(String oid) Retrieves the control with the specified OID.Control[]Retrieves the set of controls returned with this search result entry.intRetrieves the message ID for the LDAP message containing this response.inthashCode()Generates a hash code for this entry.voidtoString(StringBuilder buffer) Appends a string representation of this entry to the provided buffer.Methods inherited from class com.unboundid.ldap.sdk.ReadOnlyEntry
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeAttributeValues, removeAttributeValues, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setDN, setDNMethods inherited from class com.unboundid.ldap.sdk.Entry
addAttribute, applyModifications, applyModifications, applyModifyDN, applyModifyDN, diff, diff, diff, duplicate, getAttribute, getAttribute, getAttributes, getAttributesWithOptions, getAttributeValue, getAttributeValueAsBoolean, getAttributeValueAsDate, getAttributeValueAsDN, getAttributeValueAsInteger, getAttributeValueAsLong, getAttributeValueByteArrays, getAttributeValueBytes, getAttributeValues, getDN, getObjectClassAttribute, getObjectClassValues, getParentDN, getParentDNString, getParsedDN, getRDN, getSchema, hasAttribute, hasAttribute, hasAttribute, hasAttributeValue, hasAttributeValue, hasAttributeValue, hasAttributeValue, hasObjectClass, intersectEntries, matchesBaseAndScope, matchesBaseAndScope, mergeEntries, removeAttributeValue, removeAttributeValue, setAttribute, toLDIF, toLDIF, toLDIF, toLDIF, toLDIFString, toLDIFString, toLDIFString, toLDIFString, toString
-
Constructor Details
-
SearchResultEntry
public SearchResultEntry(@NotNull String dn, @NotNull Attribute[] attributes, @NotNull Control... controls) Creates a new search result entry with the provided information.- Parameters:
dn- The DN for this search result entry. It must not benull.attributes- The set of attributes to include in this search result entry. It must not benull.controls- The set of controls for this search result entry. It must not benull.
-
SearchResultEntry
public SearchResultEntry(int messageID, @NotNull String dn, @NotNull Attribute[] attributes, @NotNull Control... controls) Creates a new search result entry with the provided information.- Parameters:
messageID- The message ID for the LDAP message containing this response.dn- The DN for this search result entry. It must not benull.attributes- The set of attributes to include in this search result entry. It must not benull.controls- The set of controls for this search result entry. It must not benull.
-
SearchResultEntry
public SearchResultEntry(int messageID, @NotNull String dn, @Nullable Schema schema, @NotNull Attribute[] attributes, @NotNull Control... controls) Creates a new search result entry with the provided information.- Parameters:
messageID- The message ID for the LDAP message containing this response.dn- The DN for this search result entry. It must not benull.schema- The schema to use for operations involving this entry. It may benullif no schema is available.attributes- The set of attributes to include in this search result entry. It must not benull.controls- The set of controls for this search result entry. It must not benull.
-
SearchResultEntry
public SearchResultEntry(@NotNull String dn, @NotNull Collection<Attribute> attributes, @NotNull Control... controls) Creates a new search result entry with the provided information.- Parameters:
dn- The DN for this search result entry. It must not benull.attributes- The set of attributes to include in this search result entry. It must not benull.controls- The set of controls for this search result entry. It must not benull.
-
SearchResultEntry
public SearchResultEntry(int messageID, @NotNull String dn, @NotNull Collection<Attribute> attributes, @NotNull Control... controls) Creates a new search result entry with the provided information.- Parameters:
messageID- The message ID for the LDAP message containing this response.dn- The DN for this search result entry. It must not benull.attributes- The set of attributes to include in this search result entry. It must not benull.controls- The set of controls for this search result entry. It must not benull.
-
SearchResultEntry
public SearchResultEntry(int messageID, @NotNull String dn, @Nullable Schema schema, @NotNull Collection<Attribute> attributes, @NotNull Control... controls) Creates a new search result entry with the provided information.- Parameters:
messageID- The message ID for the LDAP message containing this response.dn- The DN for this search result entry. It must not benull.schema- The schema to use for operations involving this entry. It may benullif no schema is available.attributes- The set of attributes to include in this search result entry. It must not benull.controls- The set of controls for this search result entry. It must not benull.
-
SearchResultEntry
Creates a new search result entry from the provided entry.- Parameters:
entry- The entry to use to create this search result entry. It must not benull.controls- The set of controls for this search result entry. It must not benull.
-
SearchResultEntry
Creates a new search result entry from the provided entry.- Parameters:
messageID- The message ID for the LDAP message containing this response.entry- The entry to use to create this search result entry. It must not benull.controls- The set of controls for this search result entry. It must not benull.
-
-
Method Details
-
getMessageID
Retrieves the message ID for the LDAP message containing this response.- Specified by:
getMessageIDin interfaceLDAPResponse- Returns:
- The message ID for the LDAP message containing this response.
-
getControls
Retrieves the set of controls returned with this search result entry. Individual response controls of a specific type may be retrieved and decoded using thegetmethod in the response control class.- Returns:
- The set of controls returned with this search result entry.
-
getControl
Retrieves the control with the specified OID. If there is more than one control with the given OID, then the first will be returned.- Parameters:
oid- The OID of the control to retrieve.- Returns:
- The control with the requested OID, or
nullif there is no such control for this search result entry.
-
hashCode
Generates a hash code for this entry. -
equals
Indicates whether the provided object is equal to this entry. The provided object will only be considered equal to this entry if it is an entry with the same DN and set of attributes. -
toString
Appends a string representation of this entry to the provided buffer.- Specified by:
toStringin interfaceLDAPResponse- Specified by:
toStringin interfaceLDIFRecord- Overrides:
toStringin classEntry- Parameters:
buffer- The buffer to which to append the string representation of this entry.
-