Package org.ldaptive.beans.spring
Class SpringLdapEntryMapper<T>
java.lang.Object
org.ldaptive.beans.AbstractLdapEntryMapper<T>
org.ldaptive.beans.spring.SpringLdapEntryMapper<T>
- Type Parameters:
T
- type of object to map
- All Implemented Interfaces:
LdapEntryMapper<T>
Uses a
SpringClassDescriptor
for ldap entry mapping.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.expression.TypeConverter
Type converter used by all contexts.Fields inherited from class org.ldaptive.beans.AbstractLdapEntryMapper
logger
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SpringLdapEntryMapper
(org.springframework.core.convert.converter.Converter<?, ?>... c) Creates a new spring ldap entry mapper. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDefaultConverters
(org.springframework.core.convert.support.GenericConversionService service) Adds default converters to the supplied conversion service.protected org.springframework.expression.EvaluationContext
createEvaluationContext
(Object object) Creates an evaluation context to use in the spring class descriptor.protected org.springframework.expression.TypeConverter
createTypeConverter
(org.springframework.core.convert.converter.Converter<?, ?>... converters) Returns a type converter that is initialized with the supplied converters and any converters supplied byaddDefaultConverters(GenericConversionService)
.protected ClassDescriptor
getClassDescriptor
(Object object) Returns the class descriptor.Methods inherited from class org.ldaptive.beans.AbstractLdapEntryMapper
map, map, map, mapDn
-
Field Details
-
typeConverter
private final org.springframework.expression.TypeConverter typeConverterType converter used by all contexts.
-
-
Constructor Details
-
SpringLdapEntryMapper
public SpringLdapEntryMapper()Default constructor. -
SpringLdapEntryMapper
public SpringLdapEntryMapper(org.springframework.core.convert.converter.Converter<?, ?>... c) Creates a new spring ldap entry mapper.- Parameters:
c
- additional converters to add to the spring conversion service.
-
-
Method Details
-
getClassDescriptor
Description copied from class:AbstractLdapEntryMapper
Returns the class descriptor.- Specified by:
getClassDescriptor
in classAbstractLdapEntryMapper<T>
- Parameters:
object
- to return the class descriptor for- Returns:
- class descriptor
-
createEvaluationContext
Creates an evaluation context to use in the spring class descriptor. Adds the default converters from the default conversion service.- Parameters:
object
- to supply to the evaluation context- Returns:
- evaluation context
-
createTypeConverter
protected org.springframework.expression.TypeConverter createTypeConverter(org.springframework.core.convert.converter.Converter<?, ?>... converters) Returns a type converter that is initialized with the supplied converters and any converters supplied byaddDefaultConverters(GenericConversionService)
.- Parameters:
converters
- to add to the conversion service- Returns:
- type converter
-
addDefaultConverters
protected void addDefaultConverters(org.springframework.core.convert.support.GenericConversionService service) Adds default converters to the supplied conversion service.- Parameters:
service
- to add default converters to
-