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>

public class SpringLdapEntryMapper<T> extends AbstractLdapEntryMapper<T>
Uses a SpringClassDescriptor for ldap entry mapping.
  • Field Details

    • typeConverter

      private final org.springframework.expression.TypeConverter typeConverter
      Type 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

      protected ClassDescriptor getClassDescriptor(Object object)
      Description copied from class: AbstractLdapEntryMapper
      Returns the class descriptor.
      Specified by:
      getClassDescriptor in class AbstractLdapEntryMapper<T>
      Parameters:
      object - to return the class descriptor for
      Returns:
      class descriptor
    • createEvaluationContext

      protected org.springframework.expression.EvaluationContext createEvaluationContext(Object object)
      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 by addDefaultConverters(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