use of com.qcadoo.mes.technologiesGenerator.domain.OutputProductComponentId in project mes by qcadoo.
the class TechnologyProductComponentsDataProvider method findOutputs.
public List<Entity> findOutputs(final TechnologyId technologyId, final Optional<OutputProductComponentId> excludedComponentId, boolean generationMode) {
SearchCriteriaBuilder scb = null;
if (generationMode) {
scb = createGenerationModeBaseCriteria(TechnologiesConstants.MODEL_OPERATION_PRODUCT_OUT_COMPONENT, OperationProductOutComponentFields.OPERATION_COMPONENT, OperationProductOutComponentFields.PRODUCT, technologyId);
} else {
scb = createBaseCriteria(TechnologiesConstants.MODEL_OPERATION_PRODUCT_OUT_COMPONENT, OperationProductOutComponentFields.OPERATION_COMPONENT, OperationProductOutComponentFields.PRODUCT, technologyId);
}
excludedComponentId.map(OutputProductComponentId::get).map(SearchRestrictions::idNe).ifPresent(scb::add);
return scb.list().getEntities();
}
Aggregations