refactoring

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@816082 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-09-17 07:41:14 +00:00
parent 7bfec227b6
commit 3b90c5eee5
1 changed files with 10 additions and 5 deletions

View File

@ -54,15 +54,20 @@ public class EntityProcessorBase extends EntityProcessor {
public void init(Context context) {
rowIterator = null;
this.context = context;
resolver = (VariableResolverImpl) context.getVariableResolver();
if (isFirstInit) {
firstInit(context);
}
query = null;
}
/**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;
}
resolver = (VariableResolverImpl) context.getVariableResolver();
query = null;
isFirstInit = false;
}