public class DynamicSourceFieldMapper<ROW,T,K extends FieldKey<K>,E extends Exception> extends Object implements ContextualSourceFieldMapper<ROW,T>
| Constructor and Description |
|---|
DynamicSourceFieldMapper(org.simpleflatmapper.util.UnaryFactory<MapperKey<K>,ContextualSourceFieldMapper<ROW,T>> mapperFactory,
org.simpleflatmapper.util.UnaryFactoryWithException<ROW,MapperKey<K>,E> mapperKeyFromRow,
MapperKeyComparator<K> keyComparator) |
| Modifier and Type | Method and Description |
|---|---|
ContextualSourceFieldMapper<ROW,T> |
getMapper(MapperKey<K> key) |
T |
map(ROW row)
map the current row of source object to a new newInstance of T.
|
T |
map(ROW row,
MappingContext<? super ROW> context)
map the current row of source object to a new newInstance of T.
|
void |
mapTo(ROW row,
T target,
MappingContext<? super ROW> context)
map source object to target object.
|
String |
toString() |
public T map(ROW row) throws MappingException
ContextualSourceMappermap in interface ContextualSourceMapper<ROW,T>row - object to map fromMappingException - if an exception occurspublic final T map(ROW row, MappingContext<? super ROW> context) throws MappingException
SourceMappermap in interface SourceMapper<ROW,T>row - object to map fromcontext - the contextMappingException - if an exception occurspublic void mapTo(ROW row, T target, MappingContext<? super ROW> context) throws Exception
FieldMappermapTo in interface FieldMapper<ROW,T>row - object to map fromtarget - object to map tocontext - the mapping contextException - if an exception occurspublic ContextualSourceFieldMapper<ROW,T> getMapper(MapperKey<K> key)
Copyright © 2020. All rights reserved.