com.unboundid.directory.sdk.common.types
Interface Entry

All Known Subinterfaces:
UpdatableEntry

@NotExtensible
@ThreadSafety(level=INTERFACE_NOT_THREADSAFE)
public interface Entry

This interface defines a set of methods which may be used to interact with an entry.


Method Summary
 java.util.List<com.unboundid.ldap.sdk.Attribute> getAttribute(AttributeType type)
          Retrieves the attribute with the specified name.
 com.unboundid.ldap.sdk.Attribute getAttribute(AttributeType type, java.util.Set<java.lang.String> options)
          Retrieves the attribute with the specified name and exact set of options.
 java.util.List<com.unboundid.ldap.sdk.Attribute> getAttribute(java.lang.String name)
          Retrieves the attribute with the specified name.
 com.unboundid.ldap.sdk.Attribute getAttribute(java.lang.String name, java.util.Set<java.lang.String> options)
          Retrieves the attribute with the specified name and exact set of options.
 java.util.List<com.unboundid.ldap.sdk.Attribute> getAttributes()
          Retrieves a list of the attributes contained in the entry.
 java.lang.String getDN()
          Retrieves the DN of the entry as a string.
 com.unboundid.ldap.sdk.DN getParsedDN()
          Retrieves a parsed representation of the DN for the entry.
 boolean hasAttribute(AttributeType type)
          Indicates whether the entry contains an attribute with the specified type.
 boolean hasAttribute(AttributeType type, java.util.Set<java.lang.String> options)
          Indicates whether the entry contains an attribute with the specified name and set of options.
 boolean hasAttribute(java.lang.String name)
          Indicates whether the entry contains an attribute with the specified name.
 boolean hasAttribute(java.lang.String name, java.util.Set<java.lang.String> options)
          Indicates whether the entry contains an attribute with the specified name and set of options.
 boolean hasAttributeValue(AttributeType type, byte[] value)
          Indicates whether the entry contains an attribute with the specified name and value.
 boolean hasAttributeValue(AttributeType type, java.lang.String value)
          Indicates whether the entry contains an attribute with the specified name and value.
 boolean hasAttributeValue(java.lang.String name, byte[] value)
          Indicates whether the entry contains an attribute with the specified name and value.
 boolean hasAttributeValue(java.lang.String name, java.lang.String value)
          Indicates whether the entry contains an attribute with the specified name and value.
 boolean matchesBaseAndScope(java.lang.String baseDN, com.unboundid.ldap.sdk.SearchScope scope)
          Indicates whether this entry is within the range of the provided base DN and scope.
 boolean matchesFilter(com.unboundid.ldap.sdk.Filter filter)
          Indicates whether this entry matches the provided filter.
 boolean matchesFilter(java.lang.String filter)
          Indicates whether this entry matches the provided filter.
 com.unboundid.ldap.sdk.ReadOnlyEntry toLDAPSDKEntry()
          Converts this server entry to its corresponding LDAP SDK representation.
 

Method Detail

getDN

java.lang.String getDN()
Retrieves the DN of the entry as a string.

Returns:
The DN of the entry as a string.

getParsedDN

com.unboundid.ldap.sdk.DN getParsedDN()
                                      throws com.unboundid.ldap.sdk.LDAPException
Retrieves a parsed representation of the DN for the entry.

Returns:
A parsed representation of the DN for the entry.
Throws:
com.unboundid.ldap.sdk.LDAPException - If a problem occurs while trying to parse the DN.

getAttributes

java.util.List<com.unboundid.ldap.sdk.Attribute> getAttributes()
Retrieves a list of the attributes contained in the entry.

Returns:
A list of the attributes contained in the entry.

hasAttribute

boolean hasAttribute(AttributeType type)
Indicates whether the entry contains an attribute with the specified type.

Parameters:
type - The attribute type for which to make the determination. It must not be null.
Returns:
true if the entry has an attribute with the specified name, or false if not.

hasAttribute

boolean hasAttribute(java.lang.String name)
Indicates whether the entry contains an attribute with the specified name.

Parameters:
name - The name or OID of the attribute for which to make the determination. It must not be null.
Returns:
true if the entry has an attribute with the specified name, or false if not.

hasAttribute

boolean hasAttribute(AttributeType type,
                     java.util.Set<java.lang.String> options)
Indicates whether the entry contains an attribute with the specified name and set of options.

Parameters:
type - The attribute type for which to make the determination. It must not be null.
options - The set of attribute options for which to make the determination. It may be null or empty to indicate no options.
Returns:
true if the entry has an attribute with the specified name, or false if not.

hasAttribute

boolean hasAttribute(java.lang.String name,
                     java.util.Set<java.lang.String> options)
Indicates whether the entry contains an attribute with the specified name and set of options.

Parameters:
name - The name or OID of the attribute for which to make the determination. It must not be null.
options - The set of attribute options for which to make the determination. It may be null or empty to indicate no options.
Returns:
true if the entry has an attribute with the specified name, or false if not.

hasAttributeValue

boolean hasAttributeValue(AttributeType type,
                          java.lang.String value)
Indicates whether the entry contains an attribute with the specified name and value.

Parameters:
type - The attribute type for the attribute for which to make the determination. It must not be null.
value - The value for which to make the determination. It must not be null.
Returns:
true if the entry has an attribute with the specified name and value, or false if not.

hasAttributeValue

boolean hasAttributeValue(java.lang.String name,
                          java.lang.String value)
Indicates whether the entry contains an attribute with the specified name and value.

Parameters:
name - The name or OID of the attribute for which to make the determination. It must not be null.
value - The value for which to make the determination. It must not be null.
Returns:
true if the entry has an attribute with the specified name and value, or false if not.

hasAttributeValue

boolean hasAttributeValue(AttributeType type,
                          byte[] value)
Indicates whether the entry contains an attribute with the specified name and value.

Parameters:
type - The attribute type for the attribute for which to make the determination. It must not be null.
value - The value for which to make the determination. It must not be null.
Returns:
true if the entry has an attribute with the specified name and value, or false if not.

hasAttributeValue

boolean hasAttributeValue(java.lang.String name,
                          byte[] value)
Indicates whether the entry contains an attribute with the specified name and value.

Parameters:
name - The name or OID of the attribute for which to make the determination. It must not be null.
value - The value for which to make the determination. It must not be null.
Returns:
true if the entry has an attribute with the specified name and value, or false if not.

getAttribute

java.util.List<com.unboundid.ldap.sdk.Attribute> getAttribute(AttributeType type)
Retrieves the attribute with the specified name. This will include all variants of the attribute type with different sets of attribute options.

Parameters:
type - The attribute type for the attribute to retrieve. It must not be null.
Returns:
A list of all occurrences of the requested attribute with any set of options, or null if the specified attribute is not present in the entry.

getAttribute

java.util.List<com.unboundid.ldap.sdk.Attribute> getAttribute(java.lang.String name)
Retrieves the attribute with the specified name. This will include all variants of the attribute type with different sets of attribute options.

Parameters:
name - The name or OID of the attribute to retrieve. It must not be null.
Returns:
A list of all occurrences of the requested attribute with any set of options, or null if the specified attribute is not present in the entry.

getAttribute

com.unboundid.ldap.sdk.Attribute getAttribute(AttributeType type,
                                              java.util.Set<java.lang.String> options)
Retrieves the attribute with the specified name and exact set of options.

Parameters:
type - The attribute type for the attribute to retrieve. It must not be null.
options - The set of attribute options for the attribute to retrieve. It may be null or empty if there should not be any options.
Returns:
The requested attribute, or null if it is not present in the entry.

getAttribute

com.unboundid.ldap.sdk.Attribute getAttribute(java.lang.String name,
                                              java.util.Set<java.lang.String> options)
Retrieves the attribute with the specified name and exact set of options.

Parameters:
name - The name or OID of the attribute to retrieve. It must not be null.
options - The set of attribute options for the attribute to retrieve. It may be null or empty if there should not be any options.
Returns:
The requested attribute, or null if it is not present in the entry.

matchesBaseAndScope

boolean matchesBaseAndScope(java.lang.String baseDN,
                            com.unboundid.ldap.sdk.SearchScope scope)
                            throws com.unboundid.ldap.sdk.LDAPException
Indicates whether this entry is within the range of the provided base DN and scope.

Parameters:
baseDN - The base DN for which to make the determination.
scope - The scope for which to make the determination.
Returns:
true if this entry is within the range specified by the provided base DN and scope, or false if not.
Throws:
com.unboundid.ldap.sdk.LDAPException - If the provided string cannot be parsed as a valid DN.

matchesFilter

boolean matchesFilter(java.lang.String filter)
                      throws com.unboundid.ldap.sdk.LDAPException
Indicates whether this entry matches the provided filter.

Parameters:
filter - The filter for which to make the determination. It must not be null.
Returns:
true if this entry matches the provided filter, or false if not.
Throws:
com.unboundid.ldap.sdk.LDAPException - If a problem occurs while making the determination, or if the provided string cannot be parsed as a valid filter.

matchesFilter

boolean matchesFilter(com.unboundid.ldap.sdk.Filter filter)
                      throws com.unboundid.ldap.sdk.LDAPException
Indicates whether this entry matches the provided filter.

Parameters:
filter - The filter for which to make the determination. It must not be null.
Returns:
true if this entry matches the provided filter, or false if not.
Throws:
com.unboundid.ldap.sdk.LDAPException - If a problem occurs while making the determination, or if the provided string cannot be parsed as a valid filter.

toLDAPSDKEntry

com.unboundid.ldap.sdk.ReadOnlyEntry toLDAPSDKEntry()
Converts this server entry to its corresponding LDAP SDK representation.

Returns:
An LDAP SDK representation of this server entry.