public class DefaultRuleDao extends AbstractItemDao implements RuleDao
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
GET_ALL_ACTIVE_RULES_QUERY |
protected static java.lang.String |
GET_ALL_NOT_ARCHIVED_RULES_QUERY
Deprecated.
since 1811
|
protected static java.lang.String |
GET_ALL_RULES_QUERY |
protected static java.lang.String |
GET_ENGINE_RULE_TYPE_FOR_RULE_TYPE |
protected static java.lang.String |
GET_MAX_VERSION_FOR_CODE |
protected static java.lang.String |
GET_RULE_BY_CODE |
protected static java.lang.String |
GET_RULE_BY_CODE_STATUS |
protected static java.lang.String |
GET_RULE_BY_CODE_STATUSES |
protected static java.lang.String |
GET_RULE_BY_CODE_VERSION |
protected static java.lang.String |
GET_RULE_BY_STATUS_AND_VERSION |
protected static java.lang.String |
GET_RULE_BY_STATUSES |
flexibleSearchService, modelService| Constructor and Description |
|---|
DefaultRuleDao() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.StringBuilder |
createSelectStatement(java.lang.String typecode) |
protected <T extends AbstractRuleModel> |
filterByLastVersion(java.util.List<T> rulesWithVersion) |
<T extends AbstractRuleModel> |
findAllActiveRules()
Finds all active
AbstractRuleModels |
<T extends AbstractRuleModel> |
findAllActiveRulesByType(java.lang.Class<T> type)
Finds all active rules by a specified type
|
<T extends AbstractRuleModel> |
findAllRules()
Finds all rules with latest version
|
<T extends AbstractRuleModel> |
findAllRulesByType(java.lang.Class<T> type)
Finds all rules by a specified type
|
<T extends AbstractRuleModel> |
findAllRulesWithStatuses(RuleStatus... ruleStatuses)
Return all rule versions with one of the statuses listed in ruleStatuses param
|
<T extends AbstractRuleModel> |
findAllRuleVersionsByCode(java.lang.String code)
Finds all versions of
AbstractRuleModel by code. |
<T extends AbstractRuleModel> |
findAllRuleVersionsByCodeAndStatus(java.lang.String code,
RuleStatus ruleStatus)
Return all rule versions with a given code and status
|
<T extends AbstractRuleModel> |
findAllRuleVersionsByCodeAndStatuses(java.lang.String code,
RuleStatus... ruleStatuses)
Return all rule versions with a given code and one of the statuses listed in ruleStatuses param.
|
<T extends AbstractRuleModel> |
findAllToBePublishedRules()
Deprecated.
since 1811
|
<T extends AbstractRuleModel> |
findAllToBePublishedRulesByType(java.lang.Class<T> type)
Deprecated.
since 1811
|
<T extends AbstractRuleModel> |
findByVersionAndStatuses(java.lang.Long version,
RuleStatus... ruleStatuses)
Return all rules within statuses and version
|
RuleType |
findEngineRuleTypeByRuleType(java.lang.Class<?> type)
Finds engine rule type for given rule type.
|
<T extends AbstractRuleModel> |
findRuleByCode(java.lang.String code)
Finds the latest version of
AbstractRuleModel by code. |
java.util.Optional<AbstractRuleModel> |
findRuleByCodeAndStatus(java.lang.String code,
RuleStatus ruleStatus)
Return a rule, having latest version with the status
|
<T extends AbstractRuleModel> |
findRuleByCodeAndType(java.lang.String code,
java.lang.Class<T> type)
Finds
AbstractRuleModel by code. |
java.util.Optional<AbstractRuleModel> |
findRuleByCodeAndVersion(java.lang.String code,
java.lang.Long version)
Return a rule with a specified version
|
protected I18NService |
getI18NService() |
java.lang.Long |
getRuleVersion(java.lang.String code)
Return the last version of a rule with a given code
|
protected TypeService |
getTypeService() |
void |
setI18NService(I18NService i18NService) |
void |
setTypeService(TypeService typeService) |
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelServiceprotected static final java.lang.String GET_ALL_RULES_QUERY
protected static final java.lang.String GET_ALL_ACTIVE_RULES_QUERY
protected static final java.lang.String GET_RULE_BY_CODE
@Deprecated protected static final java.lang.String GET_ALL_NOT_ARCHIVED_RULES_QUERY
protected static final java.lang.String GET_ENGINE_RULE_TYPE_FOR_RULE_TYPE
protected static final java.lang.String GET_MAX_VERSION_FOR_CODE
protected static final java.lang.String GET_RULE_BY_CODE_STATUS
protected static final java.lang.String GET_RULE_BY_CODE_STATUSES
protected static final java.lang.String GET_RULE_BY_STATUSES
protected static final java.lang.String GET_RULE_BY_CODE_VERSION
protected static final java.lang.String GET_RULE_BY_STATUS_AND_VERSION
public <T extends AbstractRuleModel> java.util.List<T> findAllRules()
RuleDaofindAllRules in interface RuleDaoAbstractRuleModelspublic <T extends AbstractRuleModel> java.util.List<T> findAllRulesByType(java.lang.Class<T> type)
RuleDaofindAllRulesByType in interface RuleDaotype - - type of the rule. Must extend AbstractRuleModelpublic <T extends AbstractRuleModel> java.util.List<T> findAllActiveRules()
RuleDaoAbstractRuleModelsfindAllActiveRules in interface RuleDaoAbstractRuleModelspublic <T extends AbstractRuleModel> java.util.List<T> findAllActiveRulesByType(java.lang.Class<T> type)
RuleDaofindAllActiveRulesByType in interface RuleDaotype - - type of the rule. Must extend AbstractRuleModel@Deprecated public <T extends AbstractRuleModel> java.util.List<T> findAllToBePublishedRules()
RuleDaoAbstractRuleModelsfindAllToBePublishedRules in interface RuleDaoAbstractRuleModels@Deprecated public <T extends AbstractRuleModel> java.util.List<T> findAllToBePublishedRulesByType(java.lang.Class<T> type)
RuleDaofindAllToBePublishedRulesByType in interface RuleDaotype - - type of the rule. Must extend AbstractRuleModelpublic <T extends AbstractRuleModel> T findRuleByCode(java.lang.String code)
RuleDaoAbstractRuleModel by code.findRuleByCode in interface RuleDaocode - - code of the ruleAbstractRuleModel or null if not foundpublic <T extends AbstractRuleModel> java.util.List<T> findAllRuleVersionsByCode(java.lang.String code)
RuleDaoAbstractRuleModel by code.findAllRuleVersionsByCode in interface RuleDaocode - - code of the ruleAbstractRuleModelpublic <T extends AbstractRuleModel> T findRuleByCodeAndType(java.lang.String code, java.lang.Class<T> type)
RuleDaoAbstractRuleModel by code.findRuleByCodeAndType in interface RuleDaocode - - code of the ruletype - - type of the rule. Must extend AbstractRuleModelAbstractRuleModelpublic RuleType findEngineRuleTypeByRuleType(java.lang.Class<?> type)
RuleDaofindEngineRuleTypeByRuleType in interface RuleDaotype - - type of the rule.public java.lang.Long getRuleVersion(java.lang.String code)
RuleDaogetRuleVersion in interface RuleDaocode - the Rule codepublic java.util.Optional<AbstractRuleModel> findRuleByCodeAndStatus(java.lang.String code, RuleStatus ruleStatus)
RuleDaofindRuleByCodeAndStatus in interface RuleDaocode - the Rule coderuleStatus - the rule statuspublic <T extends AbstractRuleModel> java.util.List<T> findAllRuleVersionsByCodeAndStatus(java.lang.String code, RuleStatus ruleStatus)
RuleDaofindAllRuleVersionsByCodeAndStatus in interface RuleDaocode - the Rule coderuleStatus - the rule statusAbstractRuleModelpublic <T extends AbstractRuleModel> java.util.List<T> findAllRuleVersionsByCodeAndStatuses(java.lang.String code, RuleStatus... ruleStatuses)
RuleDaoRuleDao.findAllRuleVersionsByCode(String)findAllRuleVersionsByCodeAndStatuses in interface RuleDaocode - the Rule coderuleStatuses - the rule status arrayAbstractRuleModelpublic <T extends AbstractRuleModel> java.util.List<T> findAllRulesWithStatuses(RuleStatus... ruleStatuses)
RuleDaofindAllRulesWithStatuses in interface RuleDaoruleStatuses - the rule status arrayAbstractRuleModelpublic <T extends AbstractRuleModel> java.util.List<T> findByVersionAndStatuses(java.lang.Long version, RuleStatus... ruleStatuses)
RuleDaofindByVersionAndStatuses in interface RuleDaoversion - the rule versionruleStatuses - the rule statusesAbstractRuleModelpublic java.util.Optional<AbstractRuleModel> findRuleByCodeAndVersion(java.lang.String code, java.lang.Long version)
RuleDaofindRuleByCodeAndVersion in interface RuleDaocode - the Rule codeversion - the version numberprotected java.lang.StringBuilder createSelectStatement(java.lang.String typecode)
protected <T extends AbstractRuleModel> java.util.List<T> filterByLastVersion(java.util.List<T> rulesWithVersion)
protected I18NService getI18NService()
public void setI18NService(I18NService i18NService)
protected TypeService getTypeService()
public void setTypeService(TypeService typeService)
Copyright © 2018 SAP SE. All Rights Reserved.