Class DefaultCustomerCouponDao
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao<CustomerCouponModel>
-
- de.hybris.platform.customercouponservices.daos.impl.DefaultCustomerCouponDao
-
- All Implemented Interfaces:
CustomerCouponDao
,GenericDao<CustomerCouponModel>
public class DefaultCustomerCouponDao extends DefaultGenericDao<CustomerCouponModel> implements CustomerCouponDao
Default implementation ofCustomerCouponDao
-
-
Constructor Summary
Constructors Constructor Description DefaultCustomerCouponDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.lang.Object>
buildParamsMapForAssignableCoupons(CustomerModel customer)
protected java.util.Map<java.lang.String,java.lang.Object>
buildQueryParamsForAssignedCoupons(CustomerModel customer)
boolean
checkCustomerCouponAvailableForCustomer(java.lang.String couponCode, CustomerModel customer)
Checks if the customer coupon is available for the customerint
countAssignedCouponForCustomer(java.lang.String couponCode, CustomerModel customer)
Counts the assigned customer coupons for the customer by coupon codeprotected SortQueryData
createSortQueryData(java.lang.String sortCode, java.lang.String query)
java.util.List<CustomerCouponForPromotionSourceRuleModel>
findAllCusCouponForSourceRules(PromotionSourceRuleModel rule)
Finds customer coupon for promotion source rules by promotion source rule modeljava.util.List<CustomerCouponForPromotionSourceRuleModel>
findAllCusCouponForSourceRules(PromotionSourceRuleModel rule, java.lang.String moduleName)
Finds customer coupon for promotion source rules by promotion source rule modeljava.util.List<CustomerCouponModel>
findAssignableCoupons(CustomerModel customer, java.lang.String text)
Finds assignable customer coupons for the customer by search textjava.util.List<CustomerCouponModel>
findAssignedCouponsByCustomer(CustomerModel customer, java.lang.String text)
Finds assigned customer coupons by the customer and search textprotected java.util.List<CustomerCouponModel>
findAssignmentCoupons(CustomerModel customer, java.lang.String text, java.lang.String query, java.util.Map<java.lang.String,java.lang.Object> params)
java.util.List<CatForPromotionSourceRuleModel>
findCategoryForPromotionSourceRuleByPromotion(java.lang.String code)
Finds category for promotion source rules by promotion source rulejava.util.List<CustomerCouponModel>
findCustomerCouponByPromotionSourceRule(java.lang.String code)
Finds customer coupons by promotion source ruleSearchPageData<CustomerCouponModel>
findCustomerCouponsByCustomer(CustomerModel customer, PageableData pageableData)
Finds paginated customer couponsjava.util.List<CustomerCouponModel>
findEffectiveCustomerCouponsByCustomer(CustomerModel customer)
Finds customer coupons for the customerjava.util.List<PromotionSourceRuleModel>
findExclPromotionSourceRuleByCategory(java.lang.String categoryCode)
Finds excluded promotion source rules by categoryjava.util.List<PromotionSourceRuleModel>
findExclPromotionSourceRuleByProduct(java.lang.String productCode)
Finds excluded promotion source rules by product codeSearchPageData<CustomerCouponModel>
findPaginatedCouponsByCustomer(CustomerModel customer, SearchPageData searchPageData)
Finds paginated customer coupons by the customer and searchPageDatajava.util.List<ProductForPromotionSourceRuleModel>
findProductForPromotionSourceRuleByPromotion(java.lang.String code)
Finds product for promotion source rules by codejava.util.List<PromotionSourceRuleModel>
findPromotionSourceRuleByCategory(java.lang.String categoryCode)
Finds promotion source rules by categoryjava.util.Optional<PromotionSourceRuleModel>
findPromotionSourceRuleByCode(java.lang.String code)
Finds promotion source rules by rule codejava.util.List<PromotionSourceRuleModel>
findPromotionSourceRuleByCouponCode(java.lang.String code)
Finds promotion source rules by customer coupon codejava.util.List<PromotionSourceRuleModel>
findPromotionSourceRuleByProduct(java.lang.String productCode)
Finds promotion source rules by product codeprotected java.util.Map<java.lang.String,java.lang.String>
getCustomerCouponSortCodeToQueryAlias()
protected PagedFlexibleSearchService
getPagedFlexibleSearchService()
protected PaginatedFlexibleSearchService
getPaginatedFlexibleSearchService()
void
setCustomerCouponSortCodeToQueryAlias(java.util.Map<java.lang.String,java.lang.String> customerCouponSortCodeToQueryAlias)
void
setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
void
setPaginatedFlexibleSearchService(PaginatedFlexibleSearchService paginatedFlexibleSearchService)
-
Methods inherited from class de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao
find, find, find, find, find, getFlexibleSearchService, setFlexibleSearchService
-
-
-
-
Method Detail
-
findPromotionSourceRuleByCode
public java.util.Optional<PromotionSourceRuleModel> findPromotionSourceRuleByCode(java.lang.String code)
Description copied from interface:CustomerCouponDao
Finds promotion source rules by rule code- Specified by:
findPromotionSourceRuleByCode
in interfaceCustomerCouponDao
- Parameters:
code
- the rule code- Returns:
- the optional of PromotionSourceRuleModel
-
findPromotionSourceRuleByProduct
public java.util.List<PromotionSourceRuleModel> findPromotionSourceRuleByProduct(java.lang.String productCode)
Description copied from interface:CustomerCouponDao
Finds promotion source rules by product code- Specified by:
findPromotionSourceRuleByProduct
in interfaceCustomerCouponDao
- Parameters:
productCode
- the product code- Returns:
- the list of PromotionSourceRuleModel
-
findExclPromotionSourceRuleByProduct
public java.util.List<PromotionSourceRuleModel> findExclPromotionSourceRuleByProduct(java.lang.String productCode)
Description copied from interface:CustomerCouponDao
Finds excluded promotion source rules by product code- Specified by:
findExclPromotionSourceRuleByProduct
in interfaceCustomerCouponDao
- Parameters:
productCode
- the product code- Returns:
- the list of PromotionSourceRuleModel
-
findPromotionSourceRuleByCategory
public java.util.List<PromotionSourceRuleModel> findPromotionSourceRuleByCategory(java.lang.String categoryCode)
Description copied from interface:CustomerCouponDao
Finds promotion source rules by category- Specified by:
findPromotionSourceRuleByCategory
in interfaceCustomerCouponDao
- Parameters:
categoryCode
- the category code- Returns:
- the list of PromotionSourceRuleModel
-
findExclPromotionSourceRuleByCategory
public java.util.List<PromotionSourceRuleModel> findExclPromotionSourceRuleByCategory(java.lang.String categoryCode)
Description copied from interface:CustomerCouponDao
Finds excluded promotion source rules by category- Specified by:
findExclPromotionSourceRuleByCategory
in interfaceCustomerCouponDao
- Parameters:
categoryCode
- the category code- Returns:
- the list of PromotionSourceRuleModel
-
findCustomerCouponByPromotionSourceRule
public java.util.List<CustomerCouponModel> findCustomerCouponByPromotionSourceRule(java.lang.String code)
Description copied from interface:CustomerCouponDao
Finds customer coupons by promotion source rule- Specified by:
findCustomerCouponByPromotionSourceRule
in interfaceCustomerCouponDao
- Parameters:
code
- the promotion source rule code- Returns:
- the list of CustomerCouponModel
-
findPromotionSourceRuleByCouponCode
public java.util.List<PromotionSourceRuleModel> findPromotionSourceRuleByCouponCode(java.lang.String code)
Description copied from interface:CustomerCouponDao
Finds promotion source rules by customer coupon code- Specified by:
findPromotionSourceRuleByCouponCode
in interfaceCustomerCouponDao
- Returns:
- the list of PromotionSourceRuleModel
-
findProductForPromotionSourceRuleByPromotion
public java.util.List<ProductForPromotionSourceRuleModel> findProductForPromotionSourceRuleByPromotion(java.lang.String code)
Description copied from interface:CustomerCouponDao
Finds product for promotion source rules by code- Specified by:
findProductForPromotionSourceRuleByPromotion
in interfaceCustomerCouponDao
- Parameters:
code
- the promotion source rule code- Returns:
- the list of ProductForPromotionSourceRuleModel
-
findCategoryForPromotionSourceRuleByPromotion
public java.util.List<CatForPromotionSourceRuleModel> findCategoryForPromotionSourceRuleByPromotion(java.lang.String code)
Description copied from interface:CustomerCouponDao
Finds category for promotion source rules by promotion source rule- Specified by:
findCategoryForPromotionSourceRuleByPromotion
in interfaceCustomerCouponDao
- Parameters:
code
- the promotion source rule code- Returns:
- the list of CatForPromotionSourceRuleModel
-
findCustomerCouponsByCustomer
public SearchPageData<CustomerCouponModel> findCustomerCouponsByCustomer(CustomerModel customer, PageableData pageableData)
Description copied from interface:CustomerCouponDao
Finds paginated customer coupons- Specified by:
findCustomerCouponsByCustomer
in interfaceCustomerCouponDao
- Parameters:
customer
- the customer modelpageableData
- the data used for pagination- Returns:
- the list of paginated CustomerCouponModel
-
findAllCusCouponForSourceRules
public java.util.List<CustomerCouponForPromotionSourceRuleModel> findAllCusCouponForSourceRules(PromotionSourceRuleModel rule)
Description copied from interface:CustomerCouponDao
Finds customer coupon for promotion source rules by promotion source rule model- Specified by:
findAllCusCouponForSourceRules
in interfaceCustomerCouponDao
- Parameters:
rule
- the promotion source rule model- Returns:
- the list of CustomerCouponForPromotionSourceRuleModel
-
findAllCusCouponForSourceRules
public java.util.List<CustomerCouponForPromotionSourceRuleModel> findAllCusCouponForSourceRules(PromotionSourceRuleModel rule, java.lang.String moduleName)
Description copied from interface:CustomerCouponDao
Finds customer coupon for promotion source rules by promotion source rule model- Specified by:
findAllCusCouponForSourceRules
in interfaceCustomerCouponDao
- Parameters:
rule
- the promotion source rule modelmoduleName
- the specific module name- Returns:
- the list of CustomerCouponForPromotionSourceRuleModel
-
createSortQueryData
protected SortQueryData createSortQueryData(java.lang.String sortCode, java.lang.String query)
-
findEffectiveCustomerCouponsByCustomer
public java.util.List<CustomerCouponModel> findEffectiveCustomerCouponsByCustomer(CustomerModel customer)
Description copied from interface:CustomerCouponDao
Finds customer coupons for the customer- Specified by:
findEffectiveCustomerCouponsByCustomer
in interfaceCustomerCouponDao
- Parameters:
customer
- the customer model- Returns:
- the list of CustomerCouponModel
-
checkCustomerCouponAvailableForCustomer
public boolean checkCustomerCouponAvailableForCustomer(java.lang.String couponCode, CustomerModel customer)
Description copied from interface:CustomerCouponDao
Checks if the customer coupon is available for the customer- Specified by:
checkCustomerCouponAvailableForCustomer
in interfaceCustomerCouponDao
- Parameters:
couponCode
- the coupon codecustomer
- the customer model- Returns:
- true if the coupon is available for the customer and false otherwise
-
countAssignedCouponForCustomer
public int countAssignedCouponForCustomer(java.lang.String couponCode, CustomerModel customer)
Description copied from interface:CustomerCouponDao
Counts the assigned customer coupons for the customer by coupon code- Specified by:
countAssignedCouponForCustomer
in interfaceCustomerCouponDao
- Parameters:
couponCode
- the coupon codecustomer
- the customer model- Returns:
- the total number of assigned coupons
-
findAssignableCoupons
public java.util.List<CustomerCouponModel> findAssignableCoupons(CustomerModel customer, java.lang.String text)
Description copied from interface:CustomerCouponDao
Finds assignable customer coupons for the customer by search text- Specified by:
findAssignableCoupons
in interfaceCustomerCouponDao
- Parameters:
customer
- the customer modeltext
- the text used for searching assignable customer coupons- Returns:
- the list of CustomerCouponModel
-
findAssignedCouponsByCustomer
public java.util.List<CustomerCouponModel> findAssignedCouponsByCustomer(CustomerModel customer, java.lang.String text)
Description copied from interface:CustomerCouponDao
Finds assigned customer coupons by the customer and search text- Specified by:
findAssignedCouponsByCustomer
in interfaceCustomerCouponDao
- Parameters:
customer
- the customer modeltext
- the text used for searching assigned customer coupons- Returns:
- the list of CustomerCouponModel
-
buildParamsMapForAssignableCoupons
protected java.util.Map<java.lang.String,java.lang.Object> buildParamsMapForAssignableCoupons(CustomerModel customer)
-
buildQueryParamsForAssignedCoupons
protected java.util.Map<java.lang.String,java.lang.Object> buildQueryParamsForAssignedCoupons(CustomerModel customer)
-
findAssignmentCoupons
protected java.util.List<CustomerCouponModel> findAssignmentCoupons(CustomerModel customer, java.lang.String text, java.lang.String query, java.util.Map<java.lang.String,java.lang.Object> params)
-
findPaginatedCouponsByCustomer
public SearchPageData<CustomerCouponModel> findPaginatedCouponsByCustomer(CustomerModel customer, SearchPageData searchPageData)
Description copied from interface:CustomerCouponDao
Finds paginated customer coupons by the customer and searchPageData- Specified by:
findPaginatedCouponsByCustomer
in interfaceCustomerCouponDao
- Parameters:
customer
- the customer modelsearchPageData
- the data used for pagination- Returns:
- the paginated CustomerCouponModel
-
getPagedFlexibleSearchService
protected PagedFlexibleSearchService getPagedFlexibleSearchService()
-
setPagedFlexibleSearchService
public void setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
-
getPaginatedFlexibleSearchService
protected PaginatedFlexibleSearchService getPaginatedFlexibleSearchService()
-
setPaginatedFlexibleSearchService
public void setPaginatedFlexibleSearchService(PaginatedFlexibleSearchService paginatedFlexibleSearchService)
-
getCustomerCouponSortCodeToQueryAlias
protected java.util.Map<java.lang.String,java.lang.String> getCustomerCouponSortCodeToQueryAlias()
-
setCustomerCouponSortCodeToQueryAlias
public void setCustomerCouponSortCodeToQueryAlias(java.util.Map<java.lang.String,java.lang.String> customerCouponSortCodeToQueryAlias)
-
-