org.apache.directory.shared.ldap.entry
Class AbstractEntry<K>

java.lang.Object
  extended by org.apache.directory.shared.ldap.entry.AbstractEntry<K>
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<EntryAttribute>, Entry
Direct Known Subclasses:
DefaultClientEntry

public abstract class AbstractEntry<K>
extends java.lang.Object
implements Entry

The Abstract class where all the DefaultClientEntry and DefaultServerEntry common fields and methods will be found.

Version:
$Rev$, $Date$
Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
protected  java.util.Map<K,EntryAttribute> attributes
          A map containing all the attributes for this entry
protected  LdapDN dn
          The DN for this entry
 
Constructor Summary
AbstractEntry()
           
 
Method Summary
 void clear()
          Remove all the attributes for this entry.
 Entry clone()
          Clone the current entry
 LdapDN getDn()
          Get this entry's DN.
 java.util.Iterator<EntryAttribute> iterator()
          Returns an enumeration containing the zero or more attributes in the collection.
 void setDn(LdapDN dn)
          Set this entry's DN.
 int size()
          Returns the number of attributes.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.entry.Entry
add, add, add, add, contains, contains, contains, contains, containsAttribute, get, hasObjectClass, put, put, put, put, remove, remove, remove, remove, removeAttributes, set
 
Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
 

Field Detail

dn

protected LdapDN dn
The DN for this entry


attributes

protected java.util.Map<K,EntryAttribute> attributes
A map containing all the attributes for this entry

Constructor Detail

AbstractEntry

public AbstractEntry()
Method Detail

getDn

public LdapDN getDn()
Get this entry's DN.

Specified by:
getDn in interface Entry
Returns:
The entry's DN

setDn

public void setDn(LdapDN dn)
Set this entry's DN.

Specified by:
setDn in interface Entry
Parameters:
dn - The DN associated with this entry

clear

public void clear()
Remove all the attributes for this entry. The DN is not reset

Specified by:
clear in interface Entry

iterator

public java.util.Iterator<EntryAttribute> iterator()
Returns an enumeration containing the zero or more attributes in the collection. The behavior of the enumeration is not specified if the attribute collection is changed.

Specified by:
iterator in interface java.lang.Iterable<EntryAttribute>
Specified by:
iterator in interface Entry
Returns:
an enumeration of all contained attributes

size

public int size()
Returns the number of attributes.

Specified by:
size in interface Entry
Returns:
the number of attributes

clone

public Entry clone()
Clone the current entry

Specified by:
clone in interface Entry
Overrides:
clone in class java.lang.Object


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.