use of org.finos.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);
Condition applicationConditions = SelectorUtilities.mkApplicationConditions(options);
return DSL.selectDistinct(APPLICATION.ID).from(APPLICATION).where(APPLICATION.ORGANISATIONAL_UNIT_ID.in(ouSelector)).and(applicationConditions);
}
use of org.finos.waltz.model.ImmutableIdSelectionOptions in project waltz by khartec.
the class LogicalDataElementIdSelectorFactory method mkForDataType.
private Select<Record1<Long>> mkForDataType(IdSelectionOptions options) {
ImmutableIdSelectionOptions dtSelectorOptions = ImmutableIdSelectionOptions.builder().entityReference(options.entityReference()).scope(options.scope()).build();
Select<Record1<Long>> dtSelector = dataTypeIdSelectorFactory.apply(dtSelectorOptions);
return DSL.selectDistinct(LOGICAL_DATA_ELEMENT.ID).from(LOGICAL_DATA_ELEMENT).where(LOGICAL_DATA_ELEMENT.PARENT_DATA_TYPE_ID.in(dtSelector)).and(LOGICAL_DATA_ELEMENT.ENTITY_LIFECYCLE_STATUS.in(options.entityLifecycleStatuses()));
}
use of org.finos.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)));
}
Aggregations