Interface ProductInterestService
-
- All Known Implementing Classes:
DefaultProductInterestService
public interface ProductInterestServiceService to deal with the ProductInterests
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>>findProductInterestsByCustomer()Finds all interests watched by current customer.java.util.Optional<ProductInterestModel>getProductInterest(ProductModel productModel, CustomerModel customerModel, NotificationType notificationType, BaseStoreModel baseStore, BaseSiteModel baseSite)This method is used to find the ProductInterestModel by productModel, customerModel, notificationType, baseStore,baseSite.java.util.List<ProductInterestModel>getProductInterests(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite)This method is used to find the expired and effective ProductInterestModels by productModel, customerModel, notificationType, baseStore,baseSite.java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>>getProductsByCustomerInterests(PageableData pageableData)Finds interests watched by current customer.intgetProductsCountByCustomerInterests(PageableData pageableData)Finds the total size of search result.voidremoveAllProductInterests(java.lang.String productCode)This method will remove the interest for the current customer by product.voidremoveProductInterest(ProductInterestModel productInterest)This method will remove the interest.voidsaveProductInterest(ProductInterestModel productInterest)This method will save the new or edited interest.
-
-
-
Method Detail
-
saveProductInterest
void saveProductInterest(ProductInterestModel productInterest)
This method will save the new or edited interest.- Parameters:
productInterest- the ProductInterestModel to be saved
-
removeProductInterest
void removeProductInterest(ProductInterestModel productInterest)
This method will remove the interest.- Parameters:
productInterest- the ProductInterestModel to be removed
-
getProductInterest
java.util.Optional<ProductInterestModel> getProductInterest(ProductModel productModel, CustomerModel customerModel, NotificationType notificationType, BaseStoreModel baseStore, BaseSiteModel baseSite)
This method is used to find the ProductInterestModel by productModel, customerModel, notificationType, baseStore,baseSite.- 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
-
getProductInterests
java.util.List<ProductInterestModel> getProductInterests(CustomerModel customerModel, BaseStoreModel baseStore, BaseSiteModel baseSite)
This method is used to find the expired and effective ProductInterestModels by productModel, customerModel, notificationType, baseStore,baseSite.- 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
-
removeAllProductInterests
void removeAllProductInterests(java.lang.String productCode)
This method will remove the interest for the current customer by product.- Parameters:
productCode- the code of the product
-
getProductsByCustomerInterests
java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>> getProductsByCustomerInterests(PageableData pageableData)
Finds interests watched by current customer.- Parameters:
pageableData- the pagination data- Returns:
- Map whose key is ProductMode and value is the Map of NotificationType as key and creation time as value.
-
findProductInterestsByCustomer
java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>> findProductInterestsByCustomer()
Finds all interests watched by current customer.- Returns:
- Map whose key is ProductMode and value is the Map of NotificationType as key and creation time as value.
-
getProductsCountByCustomerInterests
int getProductsCountByCustomerInterests(PageableData pageableData)
Finds the total size of search result.- Parameters:
pageableData- the pagination data- Returns:
- the total size of search result
-
-