Class LDAPEntry
java.lang.Object
com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPEntry
- All Implemented Interfaces:
Serializable
@NotExtensible
@NotMutable
@ThreadSafety(level=NOT_THREADSAFE)
public class LDAPEntry
extends Object
implements Serializable
This class provides a data structure that represents an LDAP entry.
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, the
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, the
Entry class should be
used instead.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LDAP entry with a zero-length DN and no attributes.Creates a new LDAP entry from the providedEntryobject.Creates a new LDAP entry with the provided DN and no attributes.LDAPEntry(String distinguishedName, LDAPAttributeSet attrs) Creates a new LDAP entry with the provided DN and attributes. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String attrName) Retrieves the attribute with the specified name.getAttribute(String attrName, String lang) Retrieves the attribute with the specified base name and language subtype.Retrieves the attributes for this entry.getAttributeSet(String subtype) Retrieves the set of attributes containing the specified subtype for this entry.getDN()Retrieves the distinguished name for this entry.final EntrytoEntry()Retrieves anEntryobject that is the equivalent of this LDAP entry.toString()Retrieves a string representation of this LDAP entry.
-
Constructor Details
-
LDAPEntry
public LDAPEntry()Creates a new LDAP entry with a zero-length DN and no attributes. -
LDAPEntry
Creates a new LDAP entry with the provided DN and no attributes.- Parameters:
distinguishedName- The DN to use for the entry.
-
LDAPEntry
Creates a new LDAP entry with the provided DN and attributes.- Parameters:
distinguishedName- The DN to use for the entry.attrs- The attributes to use for the entry.
-
LDAPEntry
Creates a new LDAP entry from the providedEntryobject.- Parameters:
entry- The entry to use to create this LDAP entry.
-
-
Method Details
-
getDN
Retrieves the distinguished name for this entry.- Returns:
- The distinguished name for this entry.
-
getAttributeSet
Retrieves the attributes for this entry.- Returns:
- The attributes for this entry.
-
getAttributeSet
Retrieves the set of attributes containing the specified subtype for this entry.- Parameters:
subtype- The subtype for the attributes to retrieve.- Returns:
- The set of attributes containing the specified subtype.
-
getAttribute
Retrieves the attribute with the specified name.- Parameters:
attrName- The name of the attribute to retrieve.- Returns:
- The requested attribute, or
nullif there is none.
-
getAttribute
Retrieves the attribute with the specified base name and language subtype.- Parameters:
attrName- The base name of the attribute to retrieve.lang- The language subtype for the attribute to retrieve.- Returns:
- The requested attribute, or
nullif there is none.
-
toEntry
Retrieves anEntryobject that is the equivalent of this LDAP entry.- Returns:
- The
Entryobject that is the equivalent of this LDAP entry.
-
toString
Retrieves a string representation of this LDAP entry.
-