mirror of https://github.com/apache/lucene.git
refactoring
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@816082 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7bfec227b6
commit
3b90c5eee5
|
@ -54,15 +54,20 @@ public class EntityProcessorBase extends EntityProcessor {
|
||||||
public void init(Context context) {
|
public void init(Context context) {
|
||||||
rowIterator = null;
|
rowIterator = null;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
if (isFirstInit) {
|
|
||||||
entityName = context.getEntityAttribute("name");
|
|
||||||
String s = context.getEntityAttribute(ON_ERROR);
|
|
||||||
if (s != null) onError = s;
|
|
||||||
}
|
|
||||||
resolver = (VariableResolverImpl) context.getVariableResolver();
|
resolver = (VariableResolverImpl) context.getVariableResolver();
|
||||||
|
if (isFirstInit) {
|
||||||
|
firstInit(context);
|
||||||
|
}
|
||||||
query = null;
|
query = null;
|
||||||
isFirstInit = false;
|
}
|
||||||
|
|
||||||
|
/**first time init call. do one-time operations here
|
||||||
|
*/
|
||||||
|
protected void firstInit(Context context) {
|
||||||
|
entityName = context.getEntityAttribute("name");
|
||||||
|
String s = context.getEntityAttribute(ON_ERROR);
|
||||||
|
if (s != null) onError = s;
|
||||||
|
isFirstInit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue