public abstract class AbstractContextMapper extends Object implements ContextMapper
ContextMapper
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
.Constructor and Description |
---|
AbstractContextMapper() |
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
doMapFromContext(DirContextOperations ctx)
Map a single
DirContextOperation to an object. |
Object |
mapFromContext(Object ctx)
Map a single LDAP Context to an object.
|
public final Object mapFromContext(Object ctx)
ctx
is the object from a single SearchResult
,
Binding
, or a lookup operation.mapFromContext
in interface ContextMapper
ctx
- the context to map to an object. Typically this will be a
DirContextAdapter
instance, unless a project specific
DirObjectFactory
has been specified on the
ContextSource
.ClassCastException
- if a custom DirObjectFactory
implementation is
used, causing the objects passed in be anything else than
DirContextOperations
instances.protected abstract Object doMapFromContext(DirContextOperations ctx)
DirContextOperation
to an object. The
supplied instance is the object supplied to
mapFromContext(Object)
cast to a
DirContextOperations
.ctx
- the context to map to an object.Copyright © 2005–2016 The Spring LDAP Framework. All rights reserved.