@Test public void multiTransformer() { List<Map<String, String>> fields = new ArrayList<Map<String, String>>(); Map<String, String> entity = new HashMap<String, String>(); entity.put("transformer", T1.class.getName() + "," + T2.class.getName() + "," + T3.class.getName()); fields.add(TestRegexTransformer.getField("A", null, null, null, null)); fields.add(TestRegexTransformer.getField("B", null, null, null, null)); Context context = AbstractDataImportHandlerTest.getContext(null, null, new MockDataSource(), Context.FULL_DUMP, fields, entity); Map<String, Object> src = new HashMap<String, Object>(); src.put("A", "NA"); src.put("B", "NA"); EntityProcessorWrapper sep = new EntityProcessorWrapper(new SqlEntityProcessor(), null); sep.init(context); Map<String, Object> res = sep.applyTransformer(src); Assert.assertNotNull(res.get("T1")); Assert.assertNotNull(res.get("T2")); Assert.assertNotNull(res.get("T3")); }
public void init(Context context) { rowIterator = null; this.context = context; resolver = (VariableResolverImpl) context.getVariableResolver(); if (isFirstInit) { firstInit(context); } query = null; }
EntityProcessorBase extends EntityProcessor { public void init(Context context) { rowIterator = null; this.context = context; resolver = (VariableResolverImpl) context.getVariableResolver(); if (isFirstInit) { firstInit(context); } query = null; } }
EntityProcessorBase extends EntityProcessor { public void init(Context context) { rowIterator = null; this.context = context; resolver = (VariableResolverImpl) context.getVariableResolver(); if (isFirstInit) { firstInit(context); } query = null; }  }
EntityProcessorBase extends EntityProcessor { public void init(Context context) { rowIterator = null; this.context = context; resolver = (VariableResolverImpl) context.getVariableResolver(); if (isFirstInit) { firstInit(context); } query = null; }  void init(Context context); Map<String, Object> nextModifiedRowKey(); Map<String, Object> nextDeletedRowKey(); Map<String, Object> nextModifiedParentRowKey(); Map<String, Object> nextRow(); void destroy(); }
EntityProcessorBase extends EntityProcessor { public void init(Context context) { rowIterator = null; this.context = context; resolver = (VariableResolverImpl) context.getVariableResolver(); if (isFirstInit) { firstInit(context); } query = null; }  void init(Context context); Map<String, Object> nextModifiedRowKey(); Map<String, Object> nextDeletedRowKey(); Map<String, Object> nextModifiedParentRowKey(); Map<String, Object> nextRow(); void destroy(); static final String TRANSFORMER; static final String TRANSFORM_ROW; static final String ON_ERROR; static final String ABORT; static final String CONTINUE; static final String SKIP; static final String SKIP_DOC; static final String CACHE_KEY; static final String CACHE_LOOKUP; }