Interface CouponDao
- All Superinterfaces:
Dao
- All Known Implementing Classes:
DefaultCouponDao
Data Access Object for AbstractCoupon Model.
-
Method Summary
Modifier and TypeMethodDescriptionFinds coupon for promotion source rules by promotion source rule modelfindAllCouponForSourceRules(PromotionSourceRuleModel rule, String moduleName) Finds coupon for promotion source rules by promotion source rule modelfindCouponById(String couponId) Finds the AbstractCouponModel by its couponId.findMultiCodeCouponById(String couponId) Returns the MultiCodeCoupon for the given couponId.Returns the list of MultiCodeCoupons that have the given configuration.Finds promotion source rules by coupon codefindSingleCodeCouponById(String couponId) Finds the SingleCodeCouponModel by its couponId.
-
Method Details
-
findCouponById
Finds the AbstractCouponModel by its couponId.- Parameters:
couponId- the couponId- Returns:
- AbstractCouponModel by its couponId.
-
findSingleCodeCouponById
Finds the SingleCodeCouponModel by its couponId.- Parameters:
couponId- the couponId- Returns:
- SingleCodeCouponModel by its couponId.
-
findMultiCodeCouponById
Returns the MultiCodeCoupon for the given couponId.- Parameters:
couponId- the coupon id- Returns:
- The MultiCodeCoupon for the given coupon id or null if none is found
-
findMultiCodeCouponsByCodeConfiguration
List<MultiCodeCouponModel> findMultiCodeCouponsByCodeConfiguration(CodeGenerationConfigurationModel config) Returns the list of MultiCodeCoupons that have the given configuration.- Parameters:
config- the configuration- Returns:
- The list of muli code coupons that use the given configuration
-
findAllCouponForSourceRules
List<CustomerCouponForPromotionSourceRuleModel> findAllCouponForSourceRules(PromotionSourceRuleModel rule) Finds coupon for promotion source rules by promotion source rule model- Parameters:
rule- the promotion source rule model- Returns:
- the list of CouponForPromotionSourceRuleModel
-
findAllCouponForSourceRules
List<CustomerCouponForPromotionSourceRuleModel> findAllCouponForSourceRules(PromotionSourceRuleModel rule, String moduleName) Finds coupon for promotion source rules by promotion source rule model- Parameters:
rule- the promotion source rule modelmoduleName- the specific module name- Returns:
- the list of CustomerCouponForPromotionSourceRuleModel
-
findPromotionSourceRuleByCouponCode
Finds promotion source rules by coupon code- Parameters:
coupon- the coupon code- Returns:
- the list of PromotionSourceRuleModel
-