@Test public void testCreateListenersBuilder() { ListenersBuilder listenersBuilder = builder.createListenersBuilder(); L1 l1 = new L1(); L2 l2 = new L2(); L3 l3 = new L3(); listenersBuilder.addListener(l1); listenersBuilder.addListener(l2); listenersBuilder.addListener(l3); Map<Class<? extends Annotation>, List<StageListener>> listeners = listenersBuilder.getListeners(); assertNotNull(listeners.get(AfterSourcesMapped.class)); assertNotNull(listeners.get(AfterSourceRowsConverted.class)); assertNotNull(listeners.get(AfterTargetsMatched.class)); assertNotNull(listeners.get(AfterTargetsMapped.class)); assertNotNull(listeners.get(AfterTargetsMerged.class)); assertNotNull(listeners.get(AfterTargetsCommitted.class)); assertEquals(1, listeners.get(AfterSourcesMapped.class).size()); assertEquals(1, listeners.get(AfterSourceRowsConverted.class).size()); assertEquals(1, listeners.get(AfterTargetsMatched.class).size()); assertEquals(2, listeners.get(AfterTargetsMapped.class).size()); assertEquals(1, listeners.get(AfterTargetsMerged.class).size()); assertEquals(1, listeners.get(AfterTargetsCommitted.class).size()); }
ListenersBuilder createListenersBuilder() { return new ListenersBuilder( AfterSourceRowsConverted.class, AfterSourcesMapped.class, AfterTargetsMatched.class, AfterTargetsMapped.class, AfterTargetsMerged.class, AfterTargetsCommitted.class); }
DefaultCreateOrUpdateBuilder extends BaseTaskBuilder implements CreateOrUpdateBuilder<T> { ListenersBuilder createListenersBuilder() { return new ListenersBuilder( AfterSourceRowsConverted.class, AfterSourcesMapped.class, AfterTargetsMatched.class, AfterTargetsMapped.class, AfterTargetsMerged.class, AfterTargetsCommitted.class); } }
DefaultCreateOrUpdateBuilder extends BaseTaskBuilder implements CreateOrUpdateBuilder<T> { ListenersBuilder createListenersBuilder() { return new ListenersBuilder( AfterSourceRowsConverted.class, AfterSourcesMapped.class, AfterTargetsMatched.class, AfterTargetsMapped.class, AfterTargetsMerged.class, AfterTargetsCommitted.class); } DefaultCreateOrUpdateBuilder(
            Class<T> type,
            CreateOrUpdateTargetMerger<T> merger,
            FkResolver fkResolver,
            RowConverter rowConverter,
            ITargetCayenneService targetCayenneService,
            IExtractorService extractorService,
            ITokenManager tokenManager,
            MapperBuilder mapperBuilder); }
DefaultCreateOrUpdateBuilder extends BaseTaskBuilder implements CreateOrUpdateBuilder<T> { ListenersBuilder createListenersBuilder() { return new ListenersBuilder( AfterSourceRowsConverted.class, AfterSourcesMapped.class, AfterTargetsMatched.class, AfterTargetsMapped.class, AfterTargetsMerged.class, AfterTargetsCommitted.class); } DefaultCreateOrUpdateBuilder(
            Class<T> type,
            CreateOrUpdateTargetMerger<T> merger,
            FkResolver fkResolver,
            RowConverter rowConverter,
            ITargetCayenneService targetCayenneService,
            IExtractorService extractorService,
            ITokenManager tokenManager,
            MapperBuilder mapperBuilder); @Override DefaultCreateOrUpdateBuilder<T> sourceExtractor(String location, String name); @Override DefaultCreateOrUpdateBuilder<T> matchBy(Mapper mapper); @Override DefaultCreateOrUpdateBuilder<T> matchBy(String... keyAttributes); @Override DefaultCreateOrUpdateBuilder<T> matchBy(Property<?>... matchAttributes); @Override DefaultCreateOrUpdateBuilder<T> matchById(); @Override DefaultCreateOrUpdateBuilder<T> batchSize(int batchSize); @Override CreateOrUpdateBuilder<T> stageListener(Object listener); @Override LmTask task(); }
DefaultCreateOrUpdateBuilder extends BaseTaskBuilder implements CreateOrUpdateBuilder<T> { ListenersBuilder createListenersBuilder() { return new ListenersBuilder( AfterSourceRowsConverted.class, AfterSourcesMapped.class, AfterTargetsMatched.class, AfterTargetsMapped.class, AfterTargetsMerged.class, AfterTargetsCommitted.class); } DefaultCreateOrUpdateBuilder(
            Class<T> type,
            CreateOrUpdateTargetMerger<T> merger,
            FkResolver fkResolver,
            RowConverter rowConverter,
            ITargetCayenneService targetCayenneService,
            IExtractorService extractorService,
            ITokenManager tokenManager,
            MapperBuilder mapperBuilder); @Override DefaultCreateOrUpdateBuilder<T> sourceExtractor(String location, String name); @Override DefaultCreateOrUpdateBuilder<T> matchBy(Mapper mapper); @Override DefaultCreateOrUpdateBuilder<T> matchBy(String... keyAttributes); @Override DefaultCreateOrUpdateBuilder<T> matchBy(Property<?>... matchAttributes); @Override DefaultCreateOrUpdateBuilder<T> matchById(); @Override DefaultCreateOrUpdateBuilder<T> batchSize(int batchSize); @Override CreateOrUpdateBuilder<T> stageListener(Object listener); @Override LmTask task();  }