public final class GetterMapper<S,P> extends Object implements SourceMapper<S,P>, FieldMapper<S,P>
| Constructor and Description |
|---|
GetterMapper(ContextualGetter<? super S,P> getter) |
| Modifier and Type | Method and Description |
|---|---|
P |
map(S source,
MappingContext<? super S> context)
map the current row of source object to a new newInstance of T.
|
void |
mapTo(S source,
P target,
MappingContext<? super S> context)
map source object to target object.
|
public GetterMapper(ContextualGetter<? super S,P> getter)
public P map(S source, MappingContext<? super S> context) throws MappingException
SourceMappermap in interface SourceMapper<S,P>source - object to map fromMappingException - if an exception occurspublic void mapTo(S source, P target, MappingContext<? super S> context) throws Exception
FieldMappermapTo in interface FieldMapper<S,P>source - object to map fromtarget - object to map tocontext - the mapping contextException - if an exception occursCopyright © 2018. All rights reserved.