public class DefaultPromotionSourceRuleDao extends AbstractItemDao implements PromotionSourceRuleDao
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
EXCLUDE_CAT_WHERE |
protected static java.lang.String |
EXCLUDE_NULL_PRODUCT_PROMOTIONS |
protected static java.lang.String |
EXCLUDE_NULL_RESULTS_PROMOTIONS |
protected static java.lang.String |
EXCLUDE_PRODUCTS_WHERE |
protected static java.lang.String |
FILTER_BY_RULE_AND_MODULE_NAME |
protected static java.lang.String |
FIND_PROMOTIONS_CAT_QUERY |
protected static java.lang.String |
FIND_PROMOTIONS_CAT_SELECT |
protected static java.lang.String |
FIND_PROMOTIONS_CAT_WHERE |
protected static java.lang.String |
FIND_PROMOTIONS_COMB_CAT_QUERY |
protected static java.lang.String |
FIND_PROMOTIONS_PROD_QUERY |
protected static java.lang.String |
FIND_PROMOTIONS_PROD_SELECT |
protected static java.lang.String |
FIND_PROMOTIONS_PROD_WHERE |
protected static java.lang.String |
FIND_PROMOTIONS_SELECT |
protected static java.lang.String |
FIND_PROMOTIONS_UNION1 |
protected static java.lang.String |
FIND_PROMOTIONS_UNION2 |
protected static java.lang.String |
FIND_PROMOTIONS_UNION3 |
protected static java.lang.String |
FIND_PROMOTIONS_WHERE1 |
protected static java.lang.String |
FIND_PROMOTIONS_WHERE2 |
protected static java.lang.String |
FIND_PROMOTIONS_WITHIN_START_END_DATES |
protected static java.lang.String |
FIND_PUBLISHED_PROMOTIONS |
protected static java.lang.String |
GET_ALL_CATEGORIES_FOR_RULE |
protected static java.lang.String |
GET_ALL_CATEGORIES_FOR_RULE_AND_MODULE |
protected static java.lang.String |
GET_ALL_COMBINED_CATS_FOR_RULE |
protected static java.lang.String |
GET_ALL_COMBINED_CATS_FOR_RULE_AND_MODULE |
protected static java.lang.String |
GET_ALL_EXCLUDED_CATEGORIES_FOR_RULE |
protected static java.lang.String |
GET_ALL_EXCLUDED_CATEGORIES_FOR_RULE_AND_MODULE |
protected static java.lang.String |
GET_ALL_EXCLUDED_PRODUCTS_FOR_RULE |
protected static java.lang.String |
GET_ALL_EXCLUDED_PRODUCTS_FOR_RULE_AND_MODULE |
protected static java.lang.String |
GET_ALL_PRODUCTS_FOR_RULE |
protected static java.lang.String |
GET_ALL_PRODUCTS_FOR_RULE_AND_MODULE |
protected static java.lang.String |
GET_LAST_CONDITIONID_FOR_RULE |
flexibleSearchService, modelService| Constructor and Description |
|---|
DefaultPromotionSourceRuleDao() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<CatForPromotionSourceRuleModel> |
findAllCatForPromotionSourceRule(PromotionSourceRuleModel rule,
java.lang.String baseName)
Get all CatForPromotionSourceRuleModels for given promotion source rule and module name
|
java.util.List<CombinedCatsForRuleModel> |
findAllCombinedCatsForRule(PromotionSourceRuleModel rule,
java.lang.String baseName)
Get all CombinedCatsForRuleModels for given promotion source rule.
|
java.util.List<ExcludedCatForRuleModel> |
findAllExcludedCatForPromotionSourceRule(PromotionSourceRuleModel rule,
java.lang.String baseName)
Get all ExcludedCatForRuleModels for given promotion source rule.
|
java.util.List<ExcludedProductForRuleModel> |
findAllExcludedProductForPromotionSourceRule(PromotionSourceRuleModel rule,
java.lang.String baseName)
Get all ExcludedProductForRuleModel for given promotion source rule.
|
java.util.List<ProductForPromotionSourceRuleModel> |
findAllProductForPromotionSourceRule(PromotionSourceRuleModel rule,
java.lang.String baseName)
Get all ProductForPromotionSourceRuleModels for given promotion source rule and module name.
|
java.lang.Integer |
findLastConditionIdForRule(PromotionSourceRuleModel rule)
Get max conditionId in CombinedCatsForRule for one rule.
|
java.util.List<RuleBasedPromotionModel> |
findPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
java.lang.String productCode,
java.util.Set<java.lang.String> categoryCodes)
Finds RuleBasedPromotionModels for given product code and category codes (but will exclude all rules for which the
corresponding
PromotionSourceRuleModel.getExcludeFromStorefrontDisplay() is set to true OR current
date is out of AbstractRuleModel.getStartDate(), AbstractRuleModel.getEndDate() date
range OR the rule status AbstractRuleModel.getStatus() is not PUBLISHED). |
protected java.util.List<RuleBasedPromotionModel> |
findPromotions(java.util.Collection<PromotionGroupModel> promotionGroups,
java.lang.String productCode,
java.util.Set<java.lang.String> categoryCodes,
java.util.Date currentDate) |
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelServiceprotected static final java.lang.String FILTER_BY_RULE_AND_MODULE_NAME
protected static final java.lang.String GET_ALL_PRODUCTS_FOR_RULE
protected static final java.lang.String GET_ALL_PRODUCTS_FOR_RULE_AND_MODULE
protected static final java.lang.String GET_ALL_CATEGORIES_FOR_RULE
protected static final java.lang.String GET_ALL_CATEGORIES_FOR_RULE_AND_MODULE
protected static final java.lang.String GET_ALL_EXCLUDED_CATEGORIES_FOR_RULE
protected static final java.lang.String GET_ALL_EXCLUDED_CATEGORIES_FOR_RULE_AND_MODULE
protected static final java.lang.String GET_ALL_EXCLUDED_PRODUCTS_FOR_RULE
protected static final java.lang.String GET_ALL_EXCLUDED_PRODUCTS_FOR_RULE_AND_MODULE
protected static final java.lang.String GET_ALL_COMBINED_CATS_FOR_RULE
protected static final java.lang.String GET_ALL_COMBINED_CATS_FOR_RULE_AND_MODULE
protected static final java.lang.String GET_LAST_CONDITIONID_FOR_RULE
protected static final java.lang.String FIND_PROMOTIONS_SELECT
protected static final java.lang.String FIND_PROMOTIONS_WHERE1
protected static final java.lang.String FIND_PROMOTIONS_WHERE2
protected static final java.lang.String FIND_PROMOTIONS_WITHIN_START_END_DATES
protected static final java.lang.String FIND_PUBLISHED_PROMOTIONS
protected static final java.lang.String FIND_PROMOTIONS_PROD_SELECT
protected static final java.lang.String FIND_PROMOTIONS_PROD_WHERE
protected static final java.lang.String FIND_PROMOTIONS_CAT_SELECT
protected static final java.lang.String FIND_PROMOTIONS_CAT_WHERE
protected static final java.lang.String FIND_PROMOTIONS_COMB_CAT_QUERY
protected static final java.lang.String EXCLUDE_PRODUCTS_WHERE
protected static final java.lang.String EXCLUDE_CAT_WHERE
protected static final java.lang.String EXCLUDE_NULL_PRODUCT_PROMOTIONS
protected static final java.lang.String EXCLUDE_NULL_RESULTS_PROMOTIONS
protected static final java.lang.String FIND_PROMOTIONS_PROD_QUERY
protected static final java.lang.String FIND_PROMOTIONS_CAT_QUERY
protected static final java.lang.String FIND_PROMOTIONS_UNION1
protected static final java.lang.String FIND_PROMOTIONS_UNION2
protected static final java.lang.String FIND_PROMOTIONS_UNION3
public java.util.List<ProductForPromotionSourceRuleModel> findAllProductForPromotionSourceRule(PromotionSourceRuleModel rule, java.lang.String baseName)
PromotionSourceRuleDaofindAllProductForPromotionSourceRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get products forbaseName - KIE base nameProductForPromotionSourceRuleModel for given rulepublic java.util.List<CatForPromotionSourceRuleModel> findAllCatForPromotionSourceRule(PromotionSourceRuleModel rule, java.lang.String baseName)
PromotionSourceRuleDaofindAllCatForPromotionSourceRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get categories forbaseName - KIE base nameCatForPromotionSourceRuleModel for given rulepublic java.util.List<ExcludedCatForRuleModel> findAllExcludedCatForPromotionSourceRule(PromotionSourceRuleModel rule, java.lang.String baseName)
PromotionSourceRuleDaofindAllExcludedCatForPromotionSourceRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get excluded categories forbaseName - KIE base nameExcludedCatForRuleModel for given rulepublic java.util.List<CombinedCatsForRuleModel> findAllCombinedCatsForRule(PromotionSourceRuleModel rule, java.lang.String baseName)
PromotionSourceRuleDaofindAllCombinedCatsForRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get excluded categories forbaseName - KIE base nameCombinedCatsForRuleModel for given rulepublic java.util.List<ExcludedProductForRuleModel> findAllExcludedProductForPromotionSourceRule(PromotionSourceRuleModel rule, java.lang.String baseName)
PromotionSourceRuleDaofindAllExcludedProductForPromotionSourceRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get excluded products forbaseName - KIE base nameExcludedProductForRuleModel for given rulepublic java.util.List<RuleBasedPromotionModel> findPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, java.lang.String productCode, java.util.Set<java.lang.String> categoryCodes)
PromotionSourceRuleDaoPromotionSourceRuleModel.getExcludeFromStorefrontDisplay() is set to true OR current
date is out of AbstractRuleModel.getStartDate(), AbstractRuleModel.getEndDate() date
range OR the rule status AbstractRuleModel.getStatus() is not PUBLISHED).findPromotions in interface PromotionSourceRuleDaopromotionGroups - collection of promotion groups to get promotion rules forproductCode - product code to get related source promotion rulescategoryCodes - category codes to get related source promotion rulesRuleBasedPromotionModelpublic java.lang.Integer findLastConditionIdForRule(PromotionSourceRuleModel rule)
PromotionSourceRuleDaofindLastConditionIdForRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get max condition id forprotected java.util.List<RuleBasedPromotionModel> findPromotions(java.util.Collection<PromotionGroupModel> promotionGroups, java.lang.String productCode, java.util.Set<java.lang.String> categoryCodes, java.util.Date currentDate)
Copyright © 2018 SAP SE. All Rights Reserved.