|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.solr.handler.dataimport.EntityProcessor
org.apache.solr.handler.dataimport.EntityProcessorBase
public class EntityProcessorBase
Base class for all implementations of EntityProcessor
Most implementations of EntityProcessor
extend this base class which provides common functionality.
| Field Summary | |
|---|---|
static String |
ABORT
|
static String |
CACHE_KEY
|
static String |
CACHE_LOOKUP
|
protected String |
cachePk
Only used by cache implementations |
protected String |
cacheVariableName
Only used by cache implementations |
protected Map<String,Map<Object,List<Map<String,Object>>>> |
cacheWithWhereClause
Only used by cache implementations |
protected Context |
context
|
static String |
CONTINUE
|
protected List<Map<String,Object>> |
dataSourceRowCache
|
protected String |
entityName
|
protected boolean |
isFirstInit
|
static String |
ON_ERROR
|
protected String |
onError
|
protected String |
query
|
protected Iterator<Map<String,Object>> |
rowIterator
|
protected Map<String,List<Map<String,Object>>> |
simpleCache
Only used by cache implementations |
static String |
SKIP
|
static String |
SKIP_DOC
|
static String |
TRANSFORM_ROW
|
static String |
TRANSFORMER
|
protected List<Transformer> |
transformers
|
| Constructor Summary | |
|---|---|
EntityProcessorBase()
|
|
| Method Summary | |
|---|---|
protected void |
cacheInit()
Only used by cache implementations |
void |
destroy()
Invoked for each parent-row after the last row for this entity is processed. |
protected void |
firstInit(Context context)
first time init call. |
protected List<Map<String,Object>> |
getAllNonCachedRows()
Get all the rows from the the datasource for the given query. |
protected Map<String,Object> |
getFromRowCacheTransformed()
|
protected Map<String,Object> |
getIdCacheData(String query)
If the where clause is present the cache is sql Vs Map of key Vs List of Rows. |
protected Map<String,Object> |
getNext()
|
protected Map<String,Object> |
getSimpleCacheData(String query)
If where clause is not present the cache is a Map of query vs List of Rows. |
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 a simple implementation, this is the only method that the sub-class should implement. |
| Methods inherited from class org.apache.solr.handler.dataimport.EntityProcessor |
|---|
close, postTransform |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean isFirstInit
protected String entityName
protected Context context
protected Iterator<Map<String,Object>> rowIterator
protected List<Transformer> transformers
protected String query
protected String onError
protected String cachePk
protected String cacheVariableName
protected Map<String,List<Map<String,Object>>> simpleCache
protected Map<String,Map<Object,List<Map<String,Object>>>> cacheWithWhereClause
protected List<Map<String,Object>> dataSourceRowCache
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 static final String SKIP_DOC
public static final String CACHE_KEY
public static final String CACHE_LOOKUP
| Constructor Detail |
|---|
public EntityProcessorBase()
| Method Detail |
|---|
public void init(Context context)
EntityProcessor
init in class EntityProcessorcontext - The current contextprotected void firstInit(Context context)
protected Map<String,Object> getNext()
public Map<String,Object> nextModifiedRowKey()
EntityProcessor
nextModifiedRowKey in class EntityProcessorpublic Map<String,Object> nextDeletedRowKey()
EntityProcessor
nextDeletedRowKey in class EntityProcessorpublic Map<String,Object> nextModifiedParentRowKey()
EntityProcessor
nextModifiedParentRowKey in class EntityProcessorpublic Map<String,Object> nextRow()
nextRow in class EntityProcessorpublic void destroy()
EntityProcessor
destroy in class EntityProcessorprotected void cacheInit()
protected Map<String,Object> getIdCacheData(String query)
query - the query string for which cached data is to be returned
protected List<Map<String,Object>> getAllNonCachedRows()
Get all the rows from the the datasource for the given query. Only used by cache implementations.
This must be implemented by sub-classes which intend to provide a cached implementation
protected Map<String,Object> getSimpleCacheData(String query)
query - string for which cached row is to be returned
protected Map<String,Object> getFromRowCacheTransformed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||