Search in sources :

Example 1 with ImmutableIdSelectionOptions

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);
}
Also used : ImmutableIdSelectionOptions(org.finos.waltz.model.ImmutableIdSelectionOptions)

Example 2 with ImmutableIdSelectionOptions

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()));
}
Also used : ImmutableIdSelectionOptions(org.finos.waltz.model.ImmutableIdSelectionOptions) Record1(org.jooq.Record1)

Example 3 with ImmutableIdSelectionOptions

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)));
}
Also used : ImmutableIdSelectionOptions(org.finos.waltz.model.ImmutableIdSelectionOptions) Record1(org.jooq.Record1)

Aggregations

ImmutableIdSelectionOptions (org.finos.waltz.model.ImmutableIdSelectionOptions)3 Record1 (org.jooq.Record1)2