public class TransformSourceFieldMapper<S,I,O> extends Object implements SourceFieldMapper<S,O>
| Modifier and Type | Field and Description |
|---|---|
SourceFieldMapper<S,I> |
delegate |
FieldMapper<S,O>[] |
mappers |
org.simpleflatmapper.util.Function<I,O> |
transform |
| Constructor and Description |
|---|
TransformSourceFieldMapper(SourceFieldMapper<S,I> delegate,
FieldMapper<S,O>[] mappers,
org.simpleflatmapper.util.Function<I,O> transform) |
| Modifier and Type | Method and Description |
|---|---|
O |
map(S source,
MappingContext<? super S> context)
map the current row of source object to a new newInstance of T.
|
void |
mapTo(S source,
O target,
MappingContext<? super S> context)
map source object to target object.
|
public final SourceFieldMapper<S,I> delegate
public final FieldMapper<S,O>[] mappers
public TransformSourceFieldMapper(SourceFieldMapper<S,I> delegate, FieldMapper<S,O>[] mappers, org.simpleflatmapper.util.Function<I,O> transform)
public void mapTo(S source, O target, MappingContext<? super S> context) throws Exception
FieldMappermapTo in interface FieldMapper<S,O>source - object to map fromtarget - object to map tocontext - the mapping contextException - if an exception occurspublic O map(S source, MappingContext<? super S> context) throws MappingException
SourceMappermap in interface SourceMapper<S,O>source - object to map fromMappingException - if an exception occursCopyright © 2018. All rights reserved.