Search in sources :

Example 1 with EndUserApplication

use of com.khartec.waltz.model.enduserapp.EndUserApplication in project waltz by khartec.

the class InvolvementHarness method main.

public static void main(String[] args) throws InterruptedException {
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
    DSLContext dsl = ctx.getBean(DSLContext.class);
    DataSource dataSource = ctx.getBean(DataSource.class);
    InvolvementDao dao = ctx.getBean(InvolvementDao.class);
    InvolvementService service = ctx.getBean(InvolvementService.class);
    System.out.println("-- Waiting ...");
    // Thread.sleep(5000);
    System.out.println("-- Starting ...");
    // viaJdbc(dataSource);
    // viaJooqSql(dsl);
    // viaJooqOrig(dsl);
    // viaJooqJoins(dsl);
    // viaJooqSql(dsl);
    // viaDao(dao);
    // viaJdbc(dataSource);
    EntityIdSelectionOptions options = ImmutableEntityIdSelectionOptions.builder().desiredKind(EntityKind.END_USER_APPLICATION).entityReference(ImmutableEntityReference.builder().kind(EntityKind.PERSON).id(218).build()).scope(HierarchyQueryScope.CHILDREN).build();
    List<EndUserApplication> endUserApps = service.findAllEndUserApplicationsBySelector(options);
    System.out.println("got end user apps: " + endUserApps.size());
}
Also used : ImmutableEntityIdSelectionOptions(com.khartec.waltz.model.ImmutableEntityIdSelectionOptions) EntityIdSelectionOptions(com.khartec.waltz.model.EntityIdSelectionOptions) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) InvolvementService(com.khartec.waltz.service.involvement.InvolvementService) EndUserApplication(com.khartec.waltz.model.enduserapp.EndUserApplication) InvolvementDao(com.khartec.waltz.data.involvement.InvolvementDao) DataSource(javax.sql.DataSource)

Aggregations

InvolvementDao (com.khartec.waltz.data.involvement.InvolvementDao)1 EntityIdSelectionOptions (com.khartec.waltz.model.EntityIdSelectionOptions)1 ImmutableEntityIdSelectionOptions (com.khartec.waltz.model.ImmutableEntityIdSelectionOptions)1 EndUserApplication (com.khartec.waltz.model.enduserapp.EndUserApplication)1 InvolvementService (com.khartec.waltz.service.involvement.InvolvementService)1 DataSource (javax.sql.DataSource)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1