Search in sources :

Example 1 with PersonDao

use of com.khartec.waltz.data.person.PersonDao in project waltz by khartec.

the class PersonHarness method main.

public static void main(String[] args) {
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
    DSLContext dsl = ctx.getBean(DSLContext.class);
    PersonDao personDao = ctx.getBean(PersonDao.class);
    int c = dsl.fetchCount(PERSON, PERSON.MANAGER_EMPLOYEE_ID.eq("").or(PERSON.MANAGER_EMPLOYEE_ID.isNull()));
    int c2 = dsl.fetchCount(DSL.selectDistinct(PERSON_HIERARCHY.MANAGER_ID).from(PERSON_HIERARCHY).where(PERSON_HIERARCHY.LEVEL.eq(1)));
    System.out.println(c);
    System.out.println(c2);
}
Also used : PersonDao(com.khartec.waltz.data.person.PersonDao) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) DSLContext(org.jooq.DSLContext)

Aggregations

PersonDao (com.khartec.waltz.data.person.PersonDao)1 DSLContext (org.jooq.DSLContext)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1