ENTITY
- public class ObjectArrayToEntityTransformer<ENTITY> extends AbstractTupleToEntityTransformer<Object[],com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell,ENTITY>
AbstractEntityTransformer.getColumnFieldMapping()
and then in the result Array
simply map them into a proxy object we create.Process.Event, Process.EventPoint
Modifier and Type | Field and Description |
---|---|
protected Class<ENTITY> |
type
Intended result entity type
|
columnFieldMapping, idempotent, mode, modesSupported, nestedObjectInitMap, nonAssociatedMappers
listeners, processState
Constructor and Description |
---|
ObjectArrayToEntityTransformer() |
ObjectArrayToEntityTransformer(Class<ENTITY> type) |
ObjectArrayToEntityTransformer(Class<ENTITY> type,
List<String> fieldNames,
boolean inverse)
Internally will
AbstractEntityTransformer.setColumnFieldMapping(Map) using the field names. |
ObjectArrayToEntityTransformer(Class<ENTITY> type,
Map<Integer,Mapper> columnFieldMapping) |
ObjectArrayToEntityTransformer(ObjectArrayToEntityTransformer t) |
Modifier and Type | Method and Description |
---|---|
protected int |
getColumnIndex(com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell col) |
protected Iterator<com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell> |
getColumns(Object[] row) |
static Field[] |
getDeclaredFields(Class c) |
protected Object[] |
getTuple(Object rawTupleInput)
The input to this Transformer is expected to be Object[] type
|
protected int |
getTupleIndex(Object[] row) |
protected int |
getTupleIndexFromCol(com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell col) |
Class<ENTITY> |
getType()
Intended result entity type
|
protected Object |
getValue(com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell col,
Mapper mapper)
Ignores Mapper
|
protected ENTITY |
init(Object[] rawInput,
Map<String,Object> intermediateObjects)
Create the core Entity and also initialize intermediateObjects (nested objects) with core entities
|
void |
setType(Class<ENTITY> type)
Intended result entity type
|
identifyNode, transform
consumeIntermediateObjects, getColumnFieldMapping, getEntityAccessTransformer, getMode, getModesSupported, getNestedObjectInitMap, getNonAssiciatedMappers, getNonAssociatedMappers, getValue, init, isIdempotent, nestedInit, processValue, setColumnFieldMapping, setEntity, setEntityAccessTransformer, setIdempotent, setMode, setModesSupported, setNestedObjectInitMap, setNonAssociatedMappers
addListener, getListeners, onChangeHandler, setListeners
public ObjectArrayToEntityTransformer()
public ObjectArrayToEntityTransformer(ObjectArrayToEntityTransformer t)
public ObjectArrayToEntityTransformer(Class<ENTITY> type, List<String> fieldNames, boolean inverse)
AbstractEntityTransformer.setColumnFieldMapping(Map)
using the field names. If inverse is true then it will exclude the fieldNames and the
columns will be in ascending order of the field name (case insensitive)type
- as Class for ENTITYfieldNames
- as List of field Namesinverse
- as boolean : If true, will invert the field mapping and only fetch the fields for the entity that are not in the field list / AbstractEntityTransformer.getColumnFieldMapping()
protected int getTupleIndex(Object[] row)
getTupleIndex
in class AbstractTupleToEntityTransformer<Object[],com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell,ENTITY>
protected int getTupleIndexFromCol(com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell col)
getTupleIndexFromCol
in class AbstractTupleToEntityTransformer<Object[],com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell,ENTITY>
protected int getColumnIndex(com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell col)
getColumnIndex
in class AbstractTupleToEntityTransformer<Object[],com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell,ENTITY>
protected Object[] getTuple(Object rawTupleInput)
getTuple
in class AbstractTupleToEntityTransformer<Object[],com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell,ENTITY>
protected Iterator<com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell> getColumns(Object[] row)
getColumns
in class AbstractTupleToEntityTransformer<Object[],com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell,ENTITY>
protected Object getValue(com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell col, Mapper mapper) throws Exception
protected ENTITY init(Object[] rawInput, Map<String,Object> intermediateObjects)
AbstractEntityTransformer
init
in class AbstractEntityTransformer<Object[],com.neurosys.etl.common.transformers.ObjectArrayToEntityTransformer.Cell,ENTITY>
intermediateObjects
- the Map into which we can pre-initialize stuffCopyright © 2018. All rights reserved.