public class EntityProcessorWrapper extends EntityProcessor
EntityProcessor instance which performs transforms and handles multi-row outputs correctly.| Modifier and Type | Field and Description |
|---|---|
protected VariableResolverImpl |
resolver |
protected List<Map<String,Object>> |
rowcache |
protected List<Transformer> |
transformers |
| Constructor and Description |
|---|
EntityProcessorWrapper(EntityProcessor delegate,
DocBuilder docBuilder) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
applyTransformer(Map<String,Object> row)
handles null-on-null invocation
call transformers via
transformRow(java.util.Map<java.lang.String, java.lang.Object>), then assigns the result into row cache, and delegates to getFromRowCache() |
void |
close()
Invoked when the Entity processor is destroyed towards the end of import.
|
void |
destroy()
Invoked for each parent-row after the last row for this entity is processed.
|
Context |
getContext() |
protected Map<String,Object> |
getFromRowCache() |
VariableResolverImpl |
getVariableResolver() |
void |
init(Context context)
This method is called when it starts processing an entity.
|
Map<String,Object> |
nextDeletedRowKey()
This is used during delta-import.
|
Map<String,Object> |
nextModifiedParentRowKey()
This is used during delta-import.
|
Map<String,Object> |
nextModifiedRowKey()
This is used for delta-import.
|
Map<String,Object> |
nextRow()
for root entity it retrieves single row, transforms it,
and loop until transfomer passes the first row
for child entities whole page is pulled. where the page is non-null children entity rows.
|
protected Map<String,Object> |
pullRow()
pulls single row from the delegate EntityProcessor.
|
protected List<Map<String,Object>> |
transformRow(Map<String,Object> row)
Initialises transformers, applies them on the given row. returned collection is mutable
|
postTransformprotected VariableResolverImpl resolver
protected List<Transformer> transformers
public EntityProcessorWrapper(EntityProcessor delegate, DocBuilder docBuilder)
public void init(Context context)
EntityProcessorinit in class EntityProcessorcontext - The current contextprotected Map<String,Object> applyTransformer(Map<String,Object> row)
transformRow(java.util.Map<java.lang.String, java.lang.Object>), then assigns the result into row cache, and delegates to getFromRowCache()protected List<Map<String,Object>> transformRow(Map<String,Object> row)
public Map<String,Object> nextRow()
nextRow in class EntityProcessorprotected Map<String,Object> pullRow()
public Map<String,Object> nextModifiedRowKey()
EntityProcessornextModifiedRowKey in class EntityProcessorpublic Map<String,Object> nextDeletedRowKey()
EntityProcessornextDeletedRowKey in class EntityProcessorpublic Map<String,Object> nextModifiedParentRowKey()
EntityProcessornextModifiedParentRowKey in class EntityProcessorpublic void destroy()
EntityProcessordestroy in class EntityProcessorpublic VariableResolverImpl getVariableResolver()
public Context getContext()
public void close()
EntityProcessorclose in class EntityProcessor