public class DefaultPromotionSourceRuleDao extends AbstractItemDao implements PromotionSourceRuleDao
flexibleSearchService, modelService| Constructor and Description |
|---|
DefaultPromotionSourceRuleDao() |
| Modifier and Type | Method and Description |
|---|---|
List<CatForPromotionSourceRuleModel> |
findAllCatForPromotionSourceRule(PromotionSourceRuleModel rule)
Get all CatForPromotionSourceRuleModels for given promotion source rule.
|
List<CombinedCatsForRuleModel> |
findAllCombinedCatsForRule(PromotionSourceRuleModel rule)
Get all CombinedCatsForRuleModels for given promotion source rule.
|
List<ExcludedCatForRuleModel> |
findAllExcludedCatForPromotionSourceRule(PromotionSourceRuleModel rule)
Get all ExcludedCatForRuleModels for given promotion source rule.
|
List<ExcludedProductForRuleModel> |
findAllExcludedProductForPromotionSourceRule(PromotionSourceRuleModel rule)
Get all ExcludedProductForRuleModel for given promotion source rule.
|
List<ProductForPromotionSourceRuleModel> |
findAllProductForPromotionSourceRule(PromotionSourceRuleModel rule)
Get all ProductForPromotionSourceRuleModels for given promotion source rule.
|
Integer |
findLastConditionIdForRule(PromotionSourceRuleModel rule)
Get max conditionId in CombinedCatsForRule for one rule.
|
List<RuleBasedPromotionModel> |
findPromotions(Collection<PromotionGroupModel> promotionGroups,
String productCode,
Set<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 or MODIFIED). |
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelServiceprotected static final String GET_ALL_PRODUCTS_FOR_RULE
protected static final String GET_ALL_CATEGORIES_FOR_RULE
protected static final String GET_ALL_EXCLUDED_CATEGORIES_FOR_RULE
protected static final String GET_ALL_EXCLUDED_PRODUCTS_FOR_RULE
protected static final String GET_ALL_COMBINED_CATS_FOR_RULE
protected static final String GET_LAST_CONDITIONID_FOR_RULE
protected static final String FIND_PROMOTIONS_SELECT
protected static final String FIND_PROMOTIONS_WHERE1
protected static final String FIND_PROMOTIONS_WHERE2
protected static final String FIND_PROMOTIONS_WITHIN_START_END_DATES
protected static final String FIND_PUBLISHED_PROMOTIONS
protected static final String FIND_PROMOTIONS_PROD_SELECT
protected static final String FIND_PROMOTIONS_PROD_WHERE
protected static final String FIND_PROMOTIONS_CAT_SELECT
protected static final String FIND_PROMOTIONS_CAT_WHERE
protected static final String FIND_PROMOTIONS_COMB_CAT_QUERY
protected static final String EXCLUDE_PRODUCTS_WHERE
protected static final String EXCLUDE_CAT_WHERE
protected static final String FIND_PROMOTIONS_PROD_QUERY
protected static final String FIND_PROMOTIONS_CAT_QUERY
protected static final String FIND_PROMOTIONS_UNION1
protected static final String FIND_PROMOTIONS_UNION2
protected static final String FIND_PROMOTIONS_UNION3
public List<ProductForPromotionSourceRuleModel> findAllProductForPromotionSourceRule(PromotionSourceRuleModel rule)
PromotionSourceRuleDaofindAllProductForPromotionSourceRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get products forProductForPromotionSourceRuleModel for given rulepublic List<CatForPromotionSourceRuleModel> findAllCatForPromotionSourceRule(PromotionSourceRuleModel rule)
PromotionSourceRuleDaofindAllCatForPromotionSourceRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get categories forCatForPromotionSourceRuleModel for given rulepublic List<ExcludedCatForRuleModel> findAllExcludedCatForPromotionSourceRule(PromotionSourceRuleModel rule)
PromotionSourceRuleDaofindAllExcludedCatForPromotionSourceRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get excluded categories forExcludedCatForRuleModel for given rulepublic List<CombinedCatsForRuleModel> findAllCombinedCatsForRule(PromotionSourceRuleModel rule)
PromotionSourceRuleDaofindAllCombinedCatsForRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get excluded categories forCombinedCatsForRuleModel for given rulepublic List<ExcludedProductForRuleModel> findAllExcludedProductForPromotionSourceRule(PromotionSourceRuleModel rule)
PromotionSourceRuleDaofindAllExcludedProductForPromotionSourceRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get excluded products forExcludedProductForRuleModel for given rulepublic List<RuleBasedPromotionModel> findPromotions(Collection<PromotionGroupModel> promotionGroups, String productCode, Set<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 or MODIFIED).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 Integer findLastConditionIdForRule(PromotionSourceRuleModel rule)
PromotionSourceRuleDaofindLastConditionIdForRule in interface PromotionSourceRuleDaorule - PromotionSourceRuleModel to get max condition id forCopyright © 2017 SAP SE. All Rights Reserved.