@Override protected void applySortBy( DecisionDefinitionQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) { if (sortBy.equals(SORT_BY_CATEGORY_VALUE)) { query.orderByDecisionDefinitionCategory(); } else if (sortBy.equals(SORT_BY_KEY_VALUE)) { query.orderByDecisionDefinitionKey(); } else if (sortBy.equals(SORT_BY_ID_VALUE)) { query.orderByDecisionDefinitionId(); } else if (sortBy.equals(SORT_BY_VERSION_VALUE)) { query.orderByDecisionDefinitionVersion(); } else if (sortBy.equals(SORT_BY_NAME_VALUE)) { query.orderByDecisionDefinitionName(); } else if (sortBy.equals(SORT_BY_DEPLOYMENT_ID_VALUE)) { query.orderByDeploymentId(); } else if (sortBy.equals(SORT_BY_TENANT_ID)) { query.orderByTenantId(); } }
@Override protected void applyFilters(DecisionDefinitionQuery query) { if (decisionDefinitionId != null) { query.decisionDefinitionId(decisionDefinitionId); } if (decisionDefinitionIdIn != null && !decisionDefinitionIdIn.isEmpty()) { query.decisionDefinitionIdIn( decisionDefinitionIdIn.toArray(new String[decisionDefinitionIdIn.size()])); } if (category != null) { query.decisionDefinitionCategory(category); } if (categoryLike != null) { query.decisionDefinitionCategoryLike(categoryLike); } if (name != null) { query.decisionDefinitionName(name); } if (nameLike != null) { query.decisionDefinitionNameLike(nameLike); } if (deploymentId != null) { query.deploymentId(deploymentId); } if (key != null) { query.decisionDefinitionKey(key); } if (keyLike != null) { query.decisionDefinitionKeyLike(keyLike); } if (resourceName != null) { query.decisionDefinitionResourceName(resourceName); } if (resourceNameLike != null) { query.decisionDefinitionResourceNameLike(resourceNameLike); } if (version != null) { query.decisionDefinitionVersion(version); } if (TRUE.equals(latestVersion)) { query.latestVersion(); } if (decisionRequirementsDefinitionId != null) { query.decisionRequirementsDefinitionId(decisionRequirementsDefinitionId); } if (decisionRequirementsDefinitionKey != null) { query.decisionRequirementsDefinitionKey(decisionRequirementsDefinitionKey); } if (TRUE.equals(withoutDecisionRequirementsDefinition)) { query.withoutDecisionRequirementsDefinition(); } if (tenantIds != null && !tenantIds.isEmpty()) { query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()])); } if (TRUE.equals(withoutTenantId)) { query.withoutTenantId(); } if (TRUE.equals(includeDefinitionsWithoutTenantId)) { query.includeDecisionDefinitionsWithoutTenantId(); } }