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)booleancheckCustomerCouponAvailableForCustomer(java.lang.String couponCode, CustomerModel customer)Checks if the customer coupon is available for the customerintcountAssignedCouponForCustomer(java.lang.String couponCode, CustomerModel customer)Counts the assigned customer coupons for the customer by coupon codeprotected SortQueryDatacreateSortQueryData(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 PagedFlexibleSearchServicegetPagedFlexibleSearchService()protected PaginatedFlexibleSearchServicegetPaginatedFlexibleSearchService()voidsetCustomerCouponSortCodeToQueryAlias(java.util.Map<java.lang.String,java.lang.String> customerCouponSortCodeToQueryAlias)voidsetPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)voidsetPaginatedFlexibleSearchService(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:CustomerCouponDaoFinds promotion source rules by rule code- Specified by:
findPromotionSourceRuleByCodein 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:CustomerCouponDaoFinds promotion source rules by product code- Specified by:
findPromotionSourceRuleByProductin 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:CustomerCouponDaoFinds excluded promotion source rules by product code- Specified by:
findExclPromotionSourceRuleByProductin 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:CustomerCouponDaoFinds promotion source rules by category- Specified by:
findPromotionSourceRuleByCategoryin 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:CustomerCouponDaoFinds excluded promotion source rules by category- Specified by:
findExclPromotionSourceRuleByCategoryin 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:CustomerCouponDaoFinds customer coupons by promotion source rule- Specified by:
findCustomerCouponByPromotionSourceRulein 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:CustomerCouponDaoFinds promotion source rules by customer coupon code- Specified by:
findPromotionSourceRuleByCouponCodein interfaceCustomerCouponDao- Returns:
- the list of PromotionSourceRuleModel
-
findProductForPromotionSourceRuleByPromotion
public java.util.List<ProductForPromotionSourceRuleModel> findProductForPromotionSourceRuleByPromotion(java.lang.String code)
Description copied from interface:CustomerCouponDaoFinds product for promotion source rules by code- Specified by:
findProductForPromotionSourceRuleByPromotionin 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:CustomerCouponDaoFinds category for promotion source rules by promotion source rule- Specified by:
findCategoryForPromotionSourceRuleByPromotionin 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:CustomerCouponDaoFinds paginated customer coupons- Specified by:
findCustomerCouponsByCustomerin 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:CustomerCouponDaoFinds customer coupon for promotion source rules by promotion source rule model- Specified by:
findAllCusCouponForSourceRulesin 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:CustomerCouponDaoFinds customer coupon for promotion source rules by promotion source rule model- Specified by:
findAllCusCouponForSourceRulesin 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:CustomerCouponDaoFinds customer coupons for the customer- Specified by:
findEffectiveCustomerCouponsByCustomerin 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:CustomerCouponDaoChecks if the customer coupon is available for the customer- Specified by:
checkCustomerCouponAvailableForCustomerin 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:CustomerCouponDaoCounts the assigned customer coupons for the customer by coupon code- Specified by:
countAssignedCouponForCustomerin 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:CustomerCouponDaoFinds assignable customer coupons for the customer by search text- Specified by:
findAssignableCouponsin 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:CustomerCouponDaoFinds assigned customer coupons by the customer and search text- Specified by:
findAssignedCouponsByCustomerin 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:CustomerCouponDaoFinds paginated customer coupons by the customer and searchPageData- Specified by:
findPaginatedCouponsByCustomerin 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)
-
-