public abstract class AbstractReverseTupleToEntityTransformer<ENTITY,TUPLE> extends AbstractEntityToTupleTransformer<ENTITY,TUPLE>
Transformer
as an INPUT to its AbstractTupleToEntityTransformer
back as an input.
Mapper
is directly supplied in getColumnFieldMapping()
tupleToEntityTransformer
.getColumnFieldMapping()tupleToEntityTransformer
.getColumnFieldMapping() for the Mapper.getFieldName()
,
then it will ignore it (since the tupleToEntityTransformer
.keySet() will be considered, hence it will not even lookup a Mapper that exists in the Overriding Map
or throw a WARNING because ideally any Reverse process should be the exact opposite.
processOriginalMapperValue(Mapper, Object)
can enhance this;
if the tupleToEntityTransformer
.getColumnFieldMapping() for the concerned Mapper.getFieldName()
contains a TwoWayTransformertupleToEntityTransformer
.getColumnFieldMapping() , un-transformedMust call init if not used via Spring
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
AbstractReverseTupleToEntityTransformer.OverridableHashMap
A
Map that can provide a Primary Map and an override where it maybe applicable based on the order of precedence mentioned in AbstractEntityToTupleTransformer.transform(Object) |
Process.Event, Process.EventPoint
Modifier and Type | Field and Description |
---|---|
protected AbstractReverseTupleToEntityTransformer.OverridableHashMap |
overridableMap
Override Mappers that are required to explicitly provide a Reverse Transformation process
|
protected AbstractTupleToEntityTransformer<TUPLE,?,ENTITY> |
tupleToEntityTransformer
AbstractTupleToEntityTransformer this this Transformer will mirror |
columnFieldMapping, idempotent, mode, modesSupported, nestedObjectInitMap, nonAssociatedMappers
listeners, processState
Constructor and Description |
---|
AbstractReverseTupleToEntityTransformer() |
AbstractReverseTupleToEntityTransformer(AbstractReverseTupleToEntityTransformer t) |
AbstractReverseTupleToEntityTransformer(AbstractTupleToEntityTransformer<TUPLE,?,ENTITY> tupleToEntityTransformer) |
Modifier and Type | Method and Description |
---|---|
Map<?,Mapper> |
getColumnFieldMapping()
Mapper from Tuple Column Index/Field Name to a particular field (one to one); index # starts @ 0 |
List<String> |
getColumnNames()
Useful function to derive All Columns in the report
|
protected Object |
getValue(Object propertyKey,
ENTITY e,
Mapper mapper)
Extract the value from the Entity.
If an EntityChainAccessTransformer is defined then that is used or else default PropertyUtils.getProperty(Object, String) is used. |
void |
init() |
protected Object |
processOriginalMapperValue(Mapper mapper,
Object value)
Mapper is from
tupleToEntityTransformer then do not apply any Transformations as they are opposite of whats required, other than any TwoWayTransformation process. |
protected Object |
processOverrideMapperValue(Mapper mapper,
Object value)
Mapper an override (an Override implies this instance) and any Transformers provided in it are intended for this process.
|
protected Object |
processValue(Mapper mapper,
Object value)
Process field data for
Chain s, Transformer s, Predicate filters etcCheck if Mapper is an override from this instance or used from tupleToEntityTransformer and call the respective processor. |
identifyNode, init, setEntity, transform
consumeIntermediateObjects, getEntityAccessTransformer, getMode, getModesSupported, getNestedObjectInitMap, getNonAssiciatedMappers, getNonAssociatedMappers, isIdempotent, nestedInit, setColumnFieldMapping, setEntityAccessTransformer, setIdempotent, setMode, setModesSupported, setNestedObjectInitMap, setNonAssociatedMappers
addListener, getListeners, onChangeHandler, setListeners
protected AbstractTupleToEntityTransformer<TUPLE,?,ENTITY> tupleToEntityTransformer
AbstractTupleToEntityTransformer
this this Transformer
will mirrorprotected AbstractReverseTupleToEntityTransformer.OverridableHashMap overridableMap
public AbstractReverseTupleToEntityTransformer()
public AbstractReverseTupleToEntityTransformer(AbstractReverseTupleToEntityTransformer t)
public AbstractReverseTupleToEntityTransformer(AbstractTupleToEntityTransformer<TUPLE,?,ENTITY> tupleToEntityTransformer)
public List<String> getColumnNames()
getColumnNames
in class AbstractEntityToTupleTransformer<ENTITY,TUPLE>
public void init()
init
in class AbstractEntityTransformer<ENTITY,Object,TUPLE>
public Map<?,Mapper> getColumnFieldMapping()
AbstractEntityTransformer
Mapper
from Tuple Column Index/Field Name to a particular field (one to one); index # starts @ 0getColumnFieldMapping
in class AbstractEntityTransformer<ENTITY,Object,TUPLE>
protected Object processOverrideMapperValue(Mapper mapper, Object value) throws BreakChainException
mapper
- as Mapper
suitable decided by AbstractReverseTupleToEntityTransformer.OverridableHashMap
value
- as ObjectBreakChainException
protected Object processOriginalMapperValue(Mapper mapper, Object value) throws BreakChainException
tupleToEntityTransformer
then do not apply any Transformations as they are opposite of whats required, other than any TwoWayTransformation process.mapper
- as Mapper
suitable decided by AbstractReverseTupleToEntityTransformer.OverridableHashMap
value
- as ObjectBreakChainException
protected Object processValue(Mapper mapper, Object value) throws BreakChainException
Chain
s, Transformer
s, Predicate
filters etcMapper
is an override from this instance or used from tupleToEntityTransformer
and call the respective processor.processValue
in class AbstractEntityTransformer<ENTITY,Object,TUPLE>
mapper
- as Mapper
suitable decided by AbstractReverseTupleToEntityTransformer.OverridableHashMap
value
- as ObjectBreakChainException
#processOriginalMapperValue(Mapper, Object)}
,
#processOverrideMapperValue(Mapper, Object)}
protected Object getValue(Object propertyKey, ENTITY e, Mapper mapper) throws Exception
AbstractEntityTransformer
EntityChainAccessTransformer
is defined then that is used or else default PropertyUtils.getProperty(Object, String)
is used.Copyright © 2018. All rights reserved.