org.springframework.ldap.core.simple
Class AbstractParameterizedContextMapper<T>
java.lang.Object
org.springframework.ldap.core.simple.AbstractParameterizedContextMapper<T>
- All Implemented Interfaces:
- ContextMapper, ParameterizedContextMapper<T>
public abstract class AbstractParameterizedContextMapper<T>
- extends Object
- implements ParameterizedContextMapper<T>
Abstract superclass that may be used instead of implementing
ParameterizedContextMapper
directly. Subclassing from this superclass,
the supplied context will be automatically cast to
DirContextOperations
. Note that if you use your own
DirObjectFactory
, this implementation will fail with a
ClassCastException
.
- Author:
- Mattias Hellborg Arthursson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractParameterizedContextMapper
public AbstractParameterizedContextMapper()
mapFromContext
public final T mapFromContext(Object ctx)
- Description copied from interface:
ParameterizedContextMapper
- Map a single LDAP Context to an object. The supplied Object
ctx
is the object from a single SearchResult
,
Binding
, or a lookup operation.
- Specified by:
mapFromContext
in interface ContextMapper
- Specified by:
mapFromContext
in interface ParameterizedContextMapper<T>
- Parameters:
ctx
- the context to map to an object.
- Returns:
- an object built from the data in the context.
doMapFromContext
protected abstract T doMapFromContext(DirContextOperations ctx)
- Map a single
DirContextOperation
to an object. The
supplied instance is the object supplied to
mapFromContext(Object)
cast to a
DirContextOperations
.
- Parameters:
ctx
- the context to map to an object.
- Returns:
- an object built from the data in the context.