public interface ObjectDirectoryMapper
LdapTemplate
to map to/from entity objects annotated with the annotations specified in the org.springframework.ldap.odm.annotations
package. Instances of this class are typically intended for internal use only.| Modifier and Type | Method and Description |
|---|---|
String |
attributeFor(Class<?> clazz,
String fieldName)
Get the attribute corresponding to the specified field name.
|
Filter |
filterFor(Class<?> clazz,
Filter baseFilter)
Use the specified search filter and return a new one that only applies to entries of the specified class.
|
Name |
getCalculatedId(Object entry) |
Name |
getId(Object entry)
Get the distinguished name for the specified object.
|
String[] |
manageClass(Class<?> clazz)
Check if the specified class is already managed by this instance; if not, check the metadata and add the class to the managed
classes.
|
<T> T |
mapFromLdapDataEntry(LdapDataEntry ctx,
Class<T> clazz)
Used to convert from the JNDI LDAP representation of an Entry to the Java representation when reading from LDAP.
|
void |
mapToLdapDataEntry(Object entry,
LdapDataEntry context)
Used to convert from Java representation of an Ldap Entry when writing to
the Ldap directory
|
void |
setId(Object entry,
Name id)
Set the distinguished name for the specified object.
|
void mapToLdapDataEntry(Object entry, LdapDataEntry context)
entry - - The entry to convert.context - - The LDAP context to store the converted entryNamingException - on error.<T> T mapFromLdapDataEntry(LdapDataEntry ctx, Class<T> clazz)
NamingException - on error.Name getId(Object entry)
entry - the entry to get distinguished name for.NamingException - on error.void setId(Object entry, Name id)
entry - the entry to set the name onid - the name to setNamingException - on error.Filter filterFor(Class<?> clazz, Filter baseFilter)
clazz - the class.baseFilter - the filter we want to use.NamingException - on error.String attributeFor(Class<?> clazz, String fieldName)
clazz - the clazz.fieldName - the field name.IllegalArgumentException - if the fieldName is not present in the class or if
it is not mapped to an attribute.String[] manageClass(Class<?> clazz)
clazz - the class to manage.NamingException - on error.