public abstract class AbstractMapper<S,T> extends Object implements SourceFieldMapper<S,T>
| Constructor and Description |
|---|
AbstractMapper(org.simpleflatmapper.reflect.BiInstantiator<? super S,MappingContext<? super S>,T> instantiator) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendToStringBuilder(StringBuilder sb) |
T |
map(S source,
MappingContext<? super S> mappingContext)
map the current row of source object to a new newInstance of T.
|
protected abstract void |
mapFields(S source,
T target,
MappingContext<? super S> mappingContext) |
void |
mapTo(S source,
T target,
MappingContext<? super S> mappingContext)
map source object to target object.
|
protected abstract void |
mapToFields(S source,
T target,
MappingContext<? super S> mappingContext) |
public AbstractMapper(org.simpleflatmapper.reflect.BiInstantiator<? super S,MappingContext<? super S>,T> instantiator)
public final T map(S source, MappingContext<? super S> mappingContext) throws MappingException
SourceMappermap in interface SourceMapper<S,T>source - object to map frommappingContext - the contextMappingException - if an exception occurspublic final void mapTo(S source, T target, MappingContext<? super S> mappingContext) throws MappingException
FieldMappermapTo in interface FieldMapper<S,T>source - object to map fromtarget - object to map tomappingContext - the mapping contextMappingExceptionprotected abstract void mapFields(S source, T target, MappingContext<? super S> mappingContext) throws Exception
Exceptionprotected abstract void mapToFields(S source, T target, MappingContext<? super S> mappingContext) throws Exception
Exceptionprotected void appendToStringBuilder(StringBuilder sb)
Copyright © 2020. All rights reserved.