use of com.khartec.waltz.model.ImmutableIdSelectionOptions in project waltz by khartec.
the class SurveyInstanceIdSelectorFactory method mkForOrgUnit.
private SelectConditionStep<Record1<Long>> mkForOrgUnit(EntityReference ref, HierarchyQueryScope scope) {
ImmutableIdSelectionOptions ouSelectorOptions = ImmutableIdSelectionOptions.builder().entityReference(ref).scope(scope).build();
Select<Record1<Long>> ouSelector = orgUnitIdSelectorFactory.apply(ouSelectorOptions);
return dsl.selectDistinct(SURVEY_INSTANCE.ID).from(SURVEY_INSTANCE).where(SURVEY_INSTANCE.ENTITY_KIND.eq(ref.kind().name()).and(SURVEY_INSTANCE.ENTITY_ID.in(ouSelector)));
}
use of com.khartec.waltz.model.ImmutableIdSelectionOptions in project waltz by khartec.
the class ApplicationIdSelectorFactory method mkForOrgUnit.
private SelectConditionStep<Record1<Long>> mkForOrgUnit(IdSelectionOptions options) {
ImmutableIdSelectionOptions ouSelectorOptions = ImmutableIdSelectionOptions.builder().entityReference(options.entityReference()).scope(options.scope()).build();
Select<Record1<Long>> ouSelector = orgUnitIdSelectorFactory.apply(ouSelectorOptions);
return dsl.selectDistinct(app.ID).from(app).where(dsl.renderInlined(app.ORGANISATIONAL_UNIT_ID.in(ouSelector))).and(app.ENTITY_LIFECYCLE_STATUS.in(options.entityLifecycleStatuses()));
}
Aggregations