Package org.ldaptive.beans
Class AbstractLdapEntryMapper<T>
- java.lang.Object
-
- org.ldaptive.beans.AbstractLdapEntryMapper<T>
-
- Type Parameters:
T
- type of object to map
- All Implemented Interfaces:
LdapEntryMapper<T>
- Direct Known Subclasses:
DefaultLdapEntryMapper
,SpringLdapEntryMapper
public abstract class AbstractLdapEntryMapper<T> extends Object implements LdapEntryMapper<T>
Base implementation of an ldap entry mapper. Uses aClassDescriptor
for decoding and encoding of objects.
-
-
Constructor Summary
Constructors Constructor Description AbstractLdapEntryMapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ClassDescriptor
getClassDescriptor(T object)
Returns the class descriptor.void
map(LdapEntry source, T dest)
Injects data from the supplied ldap entry into the supplied destination object.LdapEntry
map(T source)
Injects data from the supplied source object into a new instance of ldap entry.void
map(T source, LdapEntry dest)
Injects data from the supplied source object into the supplied ldap entry.String
mapDn(T object)
Returns the LDAP DN for the supplied object.
-
-
-
Field Detail
-
logger
protected final Logger logger
Logger for this class.
-
-
Method Detail
-
getClassDescriptor
protected abstract ClassDescriptor getClassDescriptor(T object)
Returns the class descriptor.- Parameters:
object
- to return the class descriptor for- Returns:
- class descriptor
-
mapDn
public String mapDn(T object)
Description copied from interface:LdapEntryMapper
Returns the LDAP DN for the supplied object.- Specified by:
mapDn
in interfaceLdapEntryMapper<T>
- Parameters:
object
- to retrieve the DN from- Returns:
- LDAP DN
-
map
public LdapEntry map(T source)
Injects data from the supplied source object into a new instance of ldap entry.- Parameters:
source
- to read from- Returns:
- ldap entry
-
map
public void map(T source, LdapEntry dest)
Description copied from interface:LdapEntryMapper
Injects data from the supplied source object into the supplied ldap entry.- Specified by:
map
in interfaceLdapEntryMapper<T>
- Parameters:
source
- to read fromdest
- to write to
-
map
public void map(LdapEntry source, T dest)
Description copied from interface:LdapEntryMapper
Injects data from the supplied ldap entry into the supplied destination object.- Specified by:
map
in interfaceLdapEntryMapper<T>
- Parameters:
source
- to read fromdest
- to write to
-
-