Interface ProductInterestDao
-
- All Superinterfaces:
GenericDao<ProductInterestModel>
- All Known Implementing Classes:
DefaultProductInterestDao
public interface ProductInterestDao extends GenericDao<ProductInterestModel>
The dao of ProductInterest
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<ProductInterestModel>findExpiredProductInterests()This method will get all the expired interestsjava.util.Optional<ProductInterestModel>findProductInterest(ProductModel productModel, CustomerModel customerModel, NotificationType notificationType, BaseStoreModel baseStore, BaseSiteModel baseSite)This method is used to find the ProductInterestModel by its productModel, customerModel, notificationType and baseStore.java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>findProductInterestRelationsByCustomer(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite)Find all interests watched by current customerjava.util.List<ProductInterestModel>findProductInterests(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite)This method is used to find expired and effective ProductInterestModels by its productModel, customerModel, notificationType and baseStore.java.util.List<ProductInterestModel>findProductInterestsByCustomer(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite)This method will get all the interests of the current customerjava.util.List<ProductInterestModel>findProductInterestsByNotificationType(NotificationType notificationType)retrieve such ProductInterests whose notification type is BACK_IN_STOCK and not expiredjava.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>findProductsByCustomerInterests(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite, PageableData pageableData)Find interests watched by current customerintfindProductsCountByCustomerInterests(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite, PageableData pageableData)Find the total count of products watched by customer
-
-
-
Method Detail
-
findProductInterestsByCustomer
java.util.List<ProductInterestModel> findProductInterestsByCustomer(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite)
This method will get all the interests of the current customer- Parameters:
customerModel- the customer of which all the ProductInterests to be foundbaseStore- the baseStore of the ProductInterestbaseSite- the baseSite of the ProductInterest- Returns:
- all the ProductInterests of the current customer
-
findProductInterest
java.util.Optional<ProductInterestModel> findProductInterest(ProductModel productModel, CustomerModel customerModel, NotificationType notificationType, BaseStoreModel baseStore, BaseSiteModel baseSite)
This method is used to find the ProductInterestModel by its productModel, customerModel, notificationType and baseStore.- Parameters:
productModel- the product of the ProductInterestcustomerModel- the customer of the ProductInterestnotificationType- the notificationType of the ProductInterestbaseStore- the baseStore of the ProductInterestbaseSite- the baseSite of the ProductInterest- Returns:
- ProductInterestModel if found and an empty Optional otherwise
-
findProductInterests
java.util.List<ProductInterestModel> findProductInterests(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite)
This method is used to find expired and effective ProductInterestModels by its productModel, customerModel, notificationType and baseStore.- Parameters:
customerModel- the customer of the ProductInterestbaseStore- the baseStore of the ProductInterestbaseSite- the baseSite of the ProductInterest- Returns:
- ProductInterestModel if found and an empty Optional otherwise
-
findExpiredProductInterests
java.util.List<ProductInterestModel> findExpiredProductInterests()
This method will get all the expired interests- Returns:
- all the expired ProductInterests
-
findProductsByCustomerInterests
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> findProductsByCustomerInterests(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite, PageableData pageableData)
Find interests watched by current customer- Parameters:
customerModel- the customer of the ProductInterestbaseStore- the baseStore of the ProductInterestbaseSite- the baseSite of the ProductInterestpageableData- the pagination data- Returns:
- Map whose key is Product PK and value is the Map of NotificationType PK as key and creation time as value.
-
findProductInterestRelationsByCustomer
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> findProductInterestRelationsByCustomer(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite)
Find all interests watched by current customer- Parameters:
customerModel- the customer of the ProductInterestbaseStore- the baseStore of the ProductInterestbaseSite- the baseSite of the ProductInterest- Returns:
- Map whose key is Product PK and value is the Map of NotificationType PK as key and creation time as value.
-
findProductsCountByCustomerInterests
int findProductsCountByCustomerInterests(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite, PageableData pageableData)
Find the total count of products watched by customer- Parameters:
customerModel- the customer of the ProductInterestbaseStore- the baseStore of the ProductInterestbaseSite- the baseSite of the ProductInterestpageableData- the pagination data- Returns:
- the total count of products watched by customer
-
findProductInterestsByNotificationType
java.util.List<ProductInterestModel> findProductInterestsByNotificationType(NotificationType notificationType)
retrieve such ProductInterests whose notification type is BACK_IN_STOCK and not expired- Returns:
- The list of ProductInterests to send BACK_IN_STOCK notification
-
-