Class DefaultPromotionSourceRuleDao
java.lang.Object
de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
de.hybris.platform.promotionengineservices.dao.impl.DefaultPromotionSourceRuleDao
- All Implemented Interfaces:
PromotionSourceRuleDao,Dao
public class DefaultPromotionSourceRuleDao
extends AbstractItemDao
implements PromotionSourceRuleDao
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAllCatForPromotionSourceRule(PromotionSourceRuleModel rule, String baseName) Get all CatForPromotionSourceRuleModels for given promotion source rule and module namefindAllCombinedCatsForRule(PromotionSourceRuleModel rule, String baseName) Get all CombinedCatsForRuleModels for given promotion source rule.findAllExcludedCatForPromotionSourceRule(PromotionSourceRuleModel rule, String baseName) Get all ExcludedCatForRuleModels for given promotion source rule.Get all ExcludedProductForRuleModel for given promotion source rule.findAllProductForPromotionSourceRule(PromotionSourceRuleModel rule, String baseName) Get all ProductForPromotionSourceRuleModels for given promotion source rule and module name.Get max conditionId in CombinedCatsForRule for one rule.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 correspondingPromotionSourceRuleModel.getExcludeFromStorefrontDisplay()is set totrueOR current date is out ofAbstractRuleModel.getStartDate(),AbstractRuleModel.getEndDate()date range OR the rule statusAbstractRuleModel.getStatus()is not PUBLISHED).protected List<RuleBasedPromotionModel>findPromotions(Collection<PromotionGroupModel> promotionGroups, String productCode, Set<String> categoryCodes, Date currentDate) Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
Field Details
-
FILTER_BY_RULE_AND_MODULE_NAME
- See Also:
-
GET_ALL_PRODUCTS_FOR_RULE
- See Also:
-
GET_ALL_PRODUCTS_FOR_RULE_AND_MODULE
- See Also:
-
GET_ALL_CATEGORIES_FOR_RULE
- See Also:
-
GET_ALL_CATEGORIES_FOR_RULE_AND_MODULE
- See Also:
-
GET_ALL_EXCLUDED_CATEGORIES_FOR_RULE
- See Also:
-
GET_ALL_EXCLUDED_CATEGORIES_FOR_RULE_AND_MODULE
- See Also:
-
GET_ALL_EXCLUDED_PRODUCTS_FOR_RULE
- See Also:
-
GET_ALL_EXCLUDED_PRODUCTS_FOR_RULE_AND_MODULE
- See Also:
-
GET_ALL_COMBINED_CATS_FOR_RULE
- See Also:
-
GET_ALL_COMBINED_CATS_FOR_RULE_AND_MODULE
- See Also:
-
GET_LAST_CONDITIONID_FOR_RULE
- See Also:
-
FIND_PROMOTIONS_SELECT
- See Also:
-
FIND_PROMOTIONS_WHERE1
- See Also:
-
FIND_PROMOTIONS_WHERE2
- See Also:
-
FIND_PROMOTIONS_WITHIN_START_END_DATES
- See Also:
-
FIND_PUBLISHED_PROMOTIONS
- See Also:
-
FIND_PROMOTIONS_PROD_SELECT
- See Also:
-
FIND_PROMOTIONS_PROD_WHERE
- See Also:
-
FIND_PROMOTIONS_CAT_SELECT
- See Also:
-
FIND_PROMOTIONS_CAT_WHERE
- See Also:
-
FIND_PROMOTIONS_COMB_CAT_QUERY
- See Also:
-
EXCLUDE_PRODUCTS_WHERE
- See Also:
-
EXCLUDE_CAT_WHERE
- See Also:
-
EXCLUDE_NULL_PRODUCT_PROMOTIONS
- See Also:
-
EXCLUDE_NULL_RESULTS_PROMOTIONS
- See Also:
-
FIND_PROMOTIONS_PROD_QUERY
- See Also:
-
FIND_PROMOTIONS_CAT_QUERY
- See Also:
-
FIND_PROMOTIONS_UNION1
- See Also:
-
FIND_PROMOTIONS_UNION2
- See Also:
-
FIND_PROMOTIONS_UNION3
- See Also:
-
RULE_CODE_PARAM
- See Also:
-
-
Constructor Details
-
DefaultPromotionSourceRuleDao
public DefaultPromotionSourceRuleDao()
-
-
Method Details
-
findAllProductForPromotionSourceRule
public List<ProductForPromotionSourceRuleModel> findAllProductForPromotionSourceRule(PromotionSourceRuleModel rule, String baseName) Description copied from interface:PromotionSourceRuleDaoGet all ProductForPromotionSourceRuleModels for given promotion source rule and module name.- Specified by:
findAllProductForPromotionSourceRulein interfacePromotionSourceRuleDao- Parameters:
rule-PromotionSourceRuleModelto get products forbaseName- KIE base name- Returns:
- list of
ProductForPromotionSourceRuleModelfor given rule
-
findAllCatForPromotionSourceRule
public List<CatForPromotionSourceRuleModel> findAllCatForPromotionSourceRule(PromotionSourceRuleModel rule, String baseName) Description copied from interface:PromotionSourceRuleDaoGet all CatForPromotionSourceRuleModels for given promotion source rule and module name- Specified by:
findAllCatForPromotionSourceRulein interfacePromotionSourceRuleDao- Parameters:
rule-PromotionSourceRuleModelto get categories forbaseName- KIE base name- Returns:
- list of
CatForPromotionSourceRuleModelfor given rule
-
findAllExcludedCatForPromotionSourceRule
public List<ExcludedCatForRuleModel> findAllExcludedCatForPromotionSourceRule(PromotionSourceRuleModel rule, String baseName) Description copied from interface:PromotionSourceRuleDaoGet all ExcludedCatForRuleModels for given promotion source rule.- Specified by:
findAllExcludedCatForPromotionSourceRulein interfacePromotionSourceRuleDao- Parameters:
rule-PromotionSourceRuleModelto get excluded categories forbaseName- KIE base name- Returns:
- list of
ExcludedCatForRuleModelfor given rule
-
findAllCombinedCatsForRule
public List<CombinedCatsForRuleModel> findAllCombinedCatsForRule(PromotionSourceRuleModel rule, String baseName) Description copied from interface:PromotionSourceRuleDaoGet all CombinedCatsForRuleModels for given promotion source rule.- Specified by:
findAllCombinedCatsForRulein interfacePromotionSourceRuleDao- Parameters:
rule-PromotionSourceRuleModelto get excluded categories forbaseName- KIE base name- Returns:
- list of
CombinedCatsForRuleModelfor given rule
-
findAllExcludedProductForPromotionSourceRule
public List<ExcludedProductForRuleModel> findAllExcludedProductForPromotionSourceRule(PromotionSourceRuleModel rule, String baseName) Description copied from interface:PromotionSourceRuleDaoGet all ExcludedProductForRuleModel for given promotion source rule.- Specified by:
findAllExcludedProductForPromotionSourceRulein interfacePromotionSourceRuleDao- Parameters:
rule-PromotionSourceRuleModelto get excluded products forbaseName- KIE base name- Returns:
- list of
ExcludedProductForRuleModelfor given rule
-
findPromotions
public List<RuleBasedPromotionModel> findPromotions(Collection<PromotionGroupModel> promotionGroups, String productCode, Set<String> categoryCodes) Description copied from interface:PromotionSourceRuleDaoFinds RuleBasedPromotionModels for given product code and category codes (but will exclude all rules for which the correspondingPromotionSourceRuleModel.getExcludeFromStorefrontDisplay()is set totrueOR current date is out ofAbstractRuleModel.getStartDate(),AbstractRuleModel.getEndDate()date range OR the rule statusAbstractRuleModel.getStatus()is not PUBLISHED).- Specified by:
findPromotionsin interfacePromotionSourceRuleDao- Parameters:
promotionGroups- collection of promotion groups to get promotion rules forproductCode- product code to get related source promotion rulescategoryCodes- category codes to get related source promotion rules- Returns:
- List of
RuleBasedPromotionModel
-
findLastConditionIdForRule
Description copied from interface:PromotionSourceRuleDaoGet max conditionId in CombinedCatsForRule for one rule.- Specified by:
findLastConditionIdForRulein interfacePromotionSourceRuleDao- Parameters:
rule-PromotionSourceRuleModelto get max condition id for- Returns:
- Integer representing maximal condition id
-
findPromotions
protected List<RuleBasedPromotionModel> findPromotions(Collection<PromotionGroupModel> promotionGroups, String productCode, Set<String> categoryCodes, Date currentDate)
-