com.unboundid.ldap.sdk.migrate.ldapjdk
Class LDAPEntry

java.lang.Object
  extended by com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPEntry
All Implemented Interfaces:
java.io.Serializable

@NotExtensible
@NotMutable
@ThreadSafety(level=NOT_THREADSAFE)
public class LDAPEntry
extends java.lang.Object
implements java.io.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 Entry class should be used instead.

See Also:
Serialized Form

Constructor Summary
LDAPEntry()
          Creates a new LDAP entry with a zero-length DN and no attributes.
LDAPEntry(Entry entry)
          Creates a new LDAP entry from the provided Entry object.
LDAPEntry(java.lang.String distinguishedName)
          Creates a new LDAP entry with the provided DN and no attributes.
LDAPEntry(java.lang.String distinguishedName, LDAPAttributeSet attrs)
          Creates a new LDAP entry with the provided DN and attributes.
 
Method Summary
 LDAPAttribute getAttribute(java.lang.String attrName)
          Retrieves the attribute with the specified name.
 LDAPAttribute getAttribute(java.lang.String attrName, java.lang.String lang)
          Retrieves the attribute with the specified base name and language subtype.
 LDAPAttributeSet getAttributeSet()
          Retrieves the attributes for this entry.
 LDAPAttributeSet getAttributeSet(java.lang.String subtype)
          Retrieves the set of attributes containing the specified subtype for this entry.
 java.lang.String getDN()
          Retrieves the distinguished name for this entry.
 Entry toEntry()
          Retrieves an Entry object that is the equivalent of this LDAP entry.
 java.lang.String toString()
          Retrieves a string representation of this LDAP entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDAPEntry

public LDAPEntry()
Creates a new LDAP entry with a zero-length DN and no attributes.


LDAPEntry

public LDAPEntry(java.lang.String distinguishedName)
Creates a new LDAP entry with the provided DN and no attributes.

Parameters:
distinguishedName - The DN to use for the entry.

LDAPEntry

public LDAPEntry(java.lang.String distinguishedName,
                 LDAPAttributeSet attrs)
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

public LDAPEntry(Entry entry)
Creates a new LDAP entry from the provided Entry object.

Parameters:
entry - The entry to use to create this LDAP entry.
Method Detail

getDN

public java.lang.String getDN()
Retrieves the distinguished name for this entry.

Returns:
The distinguished name for this entry.

getAttributeSet

public LDAPAttributeSet getAttributeSet()
Retrieves the attributes for this entry.

Returns:
The attributes for this entry.

getAttributeSet

public LDAPAttributeSet getAttributeSet(java.lang.String subtype)
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

public LDAPAttribute getAttribute(java.lang.String attrName)
Retrieves the attribute with the specified name.

Parameters:
attrName - The name of the attribute to retrieve.
Returns:
The requested attribute, or null if there is none.

getAttribute

public LDAPAttribute getAttribute(java.lang.String attrName,
                                  java.lang.String lang)
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 null if there is none.

toEntry

public final Entry toEntry()
Retrieves an Entry object that is the equivalent of this LDAP entry.

Returns:
The Entry object that is the equivalent of this LDAP entry.

toString

public java.lang.String toString()
Retrieves a string representation of this LDAP entry.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this LDAP entry.