public final class GetterMapper<S,P> extends Object implements Mapper<S,P>
Constructor and Description |
---|
GetterMapper(org.simpleflatmapper.reflect.Getter<? super S,P> getter) |
Modifier and Type | Method and Description |
---|---|
P |
map(S source)
map the current row of source object to a new newInstance of T.
|
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 P map(S source) throws MappingException
Mapper
map
in interface Mapper<S,P>
source
- object to map fromMappingException
- if an exception occurspublic P map(S source, MappingContext<? super S> context) throws MappingException
Mapper
map
in interface Mapper<S,P>
source
- object to map fromMappingException
- if an exception occurspublic void mapTo(S source, P target, MappingContext<? super S> context) throws Exception
FieldMapper
mapTo
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.