edu.vt.middleware.ldap.bean
Class AbstractLdapEntry

java.lang.Object
  extended by edu.vt.middleware.ldap.bean.AbstractLdapBean
      extended by edu.vt.middleware.ldap.bean.AbstractLdapEntry
All Implemented Interfaces:
LdapEntry
Direct Known Subclasses:
OrderedLdapBeanFactory.OrderedLdapEntry, SortedLdapBeanFactory.SortedLdapEntry, UnorderedLdapBeanFactory.UnorderedLdapEntry

public abstract class AbstractLdapEntry
extends AbstractLdapBean
implements LdapEntry

AbstractLdapEntry provides a base implementation of LdapEntry.

Version:
$Revision: 1330 $ $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
Author:
Middleware Services

Field Summary
protected  String dn
          Distinguished name for this entry.
protected static int HASH_CODE_SEED
          hash code seed.
protected  LdapAttributes ldapAttributes
          Attributes contained in this entry.
 
Fields inherited from class edu.vt.middleware.ldap.bean.AbstractLdapBean
beanFactory, logger
 
Constructor Summary
AbstractLdapEntry(LdapBeanFactory lbf)
          Creates a new AbstractLdapEntry with the supplied ldap bean factory.
 
Method Summary
 String getDn()
          This returns the DN for this LdapEntry.
 LdapAttributes getLdapAttributes()
          This returns the LdapAttributes for this LdapEntry.
 int hashCode()
          This returns the hash code for this object.
 void setDn(String dn)
          This sets the DN for this LdapEntry.
 void setEntry(SearchResult sr)
          This sets this LdapEntry with the supplied search result.
 void setLdapAttributes(LdapAttributes a)
          This sets the attributes for this LdapEntry.
 SearchResult toSearchResult()
          This returns a SearchResult that represents this entry.
 String toString()
          This returns a string representation of this object.
 
Methods inherited from class edu.vt.middleware.ldap.bean.AbstractLdapBean
equals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HASH_CODE_SEED

protected static final int HASH_CODE_SEED
hash code seed.

See Also:
Constant Field Values

dn

protected String dn
Distinguished name for this entry.


ldapAttributes

protected LdapAttributes ldapAttributes
Attributes contained in this entry.

Constructor Detail

AbstractLdapEntry

public AbstractLdapEntry(LdapBeanFactory lbf)
Creates a new AbstractLdapEntry with the supplied ldap bean factory.

Parameters:
lbf - LdapBeanFactory
Method Detail

getDn

public String getDn()
This returns the DN for this LdapEntry.

Specified by:
getDn in interface LdapEntry
Returns:
String

getLdapAttributes

public LdapAttributes getLdapAttributes()
This returns the LdapAttributes for this LdapEntry.

Specified by:
getLdapAttributes in interface LdapEntry
Returns:
LdapAttributes

setEntry

public void setEntry(SearchResult sr)
              throws NamingException
This sets this LdapEntry with the supplied search result.

Specified by:
setEntry in interface LdapEntry
Parameters:
sr - SearchResult
Throws:
NamingException - if the search result cannot be read

setDn

public void setDn(String dn)
This sets the DN for this LdapEntry.

Specified by:
setDn in interface LdapEntry
Parameters:
dn - String

setLdapAttributes

public void setLdapAttributes(LdapAttributes a)
This sets the attributes for this LdapEntry.

Specified by:
setLdapAttributes in interface LdapEntry
Parameters:
a - LdapAttribute

hashCode

public int hashCode()
This returns the hash code for this object.

Specified by:
hashCode in class AbstractLdapBean
Returns:
int

toString

public String toString()
This returns a string representation of this object.

Overrides:
toString in class Object
Returns:
String

toSearchResult

public SearchResult toSearchResult()
This returns a SearchResult that represents this entry.

Specified by:
toSearchResult in interface LdapEntry
Returns:
SearchResult


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.