Search in sources :

Example 1 with ChangeInitiativeDao

use of org.finos.waltz.data.change_initiative.ChangeInitiativeDao in project waltz by khartec.

the class ChangeInitiativeHarness method main.

public static void main(String[] args) throws ParseException {
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
    DSLContext dsl = ctx.getBean(DSLContext.class);
    ChangeInitiativeDao dao = ctx.getBean(ChangeInitiativeDao.class);
    ChangeInitiativeIdSelectorFactory selectorFactory = new ChangeInitiativeIdSelectorFactory();
    IdSelectionOptions opts = mkOpts(mkRef(EntityKind.APP_GROUP, 2), HierarchyQueryScope.EXACT);
    Select<Record1<Long>> selector = selectorFactory.apply(opts);
    dsl.fetch(selector).formatCSV(System.out);
    dao.findForSelector(selector);
}
Also used : AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) ChangeInitiativeDao(org.finos.waltz.data.change_initiative.ChangeInitiativeDao) DSLContext(org.jooq.DSLContext) ChangeInitiativeIdSelectorFactory(org.finos.waltz.data.change_initiative.ChangeInitiativeIdSelectorFactory) IdSelectionOptions(org.finos.waltz.model.IdSelectionOptions) Record1(org.jooq.Record1)

Aggregations

ChangeInitiativeDao (org.finos.waltz.data.change_initiative.ChangeInitiativeDao)1 ChangeInitiativeIdSelectorFactory (org.finos.waltz.data.change_initiative.ChangeInitiativeIdSelectorFactory)1 IdSelectionOptions (org.finos.waltz.model.IdSelectionOptions)1 DSLContext (org.jooq.DSLContext)1 Record1 (org.jooq.Record1)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1