public class EntityProcessorBase extends EntityProcessor
Base class for all implementations of EntityProcessor
Most implementations of EntityProcessor
extend this base class which provides common functionality.
Modifier and Type | Field and Description |
---|---|
static String |
ABORT |
protected DIHCacheSupport |
cacheSupport |
protected Context |
context |
static String |
CONTINUE |
protected String |
entityName |
protected boolean |
isFirstInit |
static String |
ON_ERROR |
protected String |
onError |
protected String |
query |
protected Iterator<Map<String,Object>> |
rowIterator |
static String |
SKIP |
static String |
TRANSFORM_ROW |
static String |
TRANSFORMER |
Constructor and Description |
---|
EntityProcessorBase() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Invoked for each entity at the very end of the import to do any needed cleanup tasks.
|
protected void |
firstInit(Context context)
first time init call.
|
protected Map<String,Object> |
getNext() |
void |
init(Context context)
This method is called when it starts processing an entity.
|
protected void |
initCache(Context context) |
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 a simple implementation, this is the only method that the sub-class should implement.
|
close, postTransform
protected boolean isFirstInit
protected String entityName
protected Context context
protected String query
protected String onError
protected DIHCacheSupport cacheSupport
public static final String TRANSFORMER
public static final String TRANSFORM_ROW
public static final String ON_ERROR
public static final String ABORT
public static final String CONTINUE
public static final String SKIP
public void init(Context context)
EntityProcessor
init
in class EntityProcessor
context
- The current contextprotected void firstInit(Context context)
protected void initCache(Context context)
public Map<String,Object> nextModifiedRowKey()
EntityProcessor
nextModifiedRowKey
in class EntityProcessor
public Map<String,Object> nextDeletedRowKey()
EntityProcessor
nextDeletedRowKey
in class EntityProcessor
public Map<String,Object> nextModifiedParentRowKey()
EntityProcessor
nextModifiedParentRowKey
in class EntityProcessor
public Map<String,Object> nextRow()
nextRow
in class EntityProcessor
public void destroy()
EntityProcessor
destroy
in class EntityProcessor
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.