use of com.khartec.waltz.model.IdSelectionOptions in project waltz by khartec.
the class LogicalFlowStatsHarness method main.
public static void main(String[] args) throws ParseException {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
DSLContext dsl = ctx.getBean(DSLContext.class);
LogicalFlowService service = ctx.getBean(LogicalFlowService.class);
IdSelectionOptions options = IdSelectionOptions.mkOpts(EntityReference.mkRef(EntityKind.ORG_UNIT, 50L), HierarchyQueryScope.CHILDREN);
service.calculateStats(options);
System.out.println("--done");
}
use of com.khartec.waltz.model.IdSelectionOptions in project waltz by khartec.
the class EndUserAppIdSelectorFactory method mkForOrgUnit.
@Override
protected Select<Record1<Long>> mkForOrgUnit(EntityReference ref, HierarchyQueryScope scope) {
IdSelectionOptions ouSelectorOptions = ImmutableIdSelectionOptions.builder().entityReference(ref).scope(scope).build();
Select<Record1<Long>> ouSelector = orgUnitIdSelectorFactory.apply(ouSelectorOptions);
return dsl.selectDistinct(eua.ID).from(eua).where(dsl.renderInlined(eua.ORGANISATIONAL_UNIT_ID.in(ouSelector)));
}
Aggregations