public class DefaultProductInterestService extends java.lang.Object implements ProductInterestService
| Constructor and Description |
|---|
DefaultProductInterestService() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<NotificationType,java.util.Date> |
buildInterestMap(java.util.Map<java.lang.String,java.lang.String> interestCreationMap)
build interest data as a linked map
|
protected void |
fillProductModelMap(java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>> productModelMap,
java.lang.String productPk,
java.util.Map<java.lang.String,java.lang.String> interestCreationMap) |
java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>> |
findProductInterestsByCustomer()
Find all interests watched by current customer
|
protected BaseSiteService |
getBaseSiteService() |
protected BaseStoreService |
getBaseStoreService() |
protected ModelService |
getModelService() |
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
|
protected ProductInterestDao |
getProductInterestDao() |
java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>> |
getProductsByCustomerInterests(PageableData pageableData)
Find interests watched by current customer
|
int |
getProductsCountByCustomerInterests(PageableData pageableData)
Find the total size of search result
|
protected UserService |
getUserService() |
void |
removeAllProductInterests(java.lang.String productCode)
This method will remove the interest for the current customer by product
|
void |
removeProductInterest(ProductInterestModel productInterest)
This method will remove the interest
|
void |
saveProductInterest(ProductInterestModel productInterest)
This method will save the new or edited interest
|
void |
setBaseSiteService(BaseSiteService baseSiteService) |
void |
setBaseStoreService(BaseStoreService baseStoreService) |
void |
setModelService(ModelService modelService) |
void |
setProductInterestDao(ProductInterestDao productInterestDao) |
void |
setUserService(UserService userService) |
public void saveProductInterest(ProductInterestModel productInterest)
ProductInterestServicesaveProductInterest in interface ProductInterestServiceproductInterest - the ProductInterestModel to be savedpublic void removeProductInterest(ProductInterestModel productInterest)
ProductInterestServiceremoveProductInterest in interface ProductInterestServiceproductInterest - the ProductInterestModel to be removedpublic java.util.Optional<ProductInterestModel> getProductInterest(ProductModel productModel, CustomerModel customerModel, NotificationType notificationType, BaseStoreModel baseStore, BaseSiteModel baseSite)
ProductInterestServicegetProductInterest in interface ProductInterestServiceproductModel - the product of the ProductInterestcustomerModel - the customer of the ProductInterestnotificationType - the notificationType of the ProductInterestbaseStore - the baseStore of the ProductInterestbaseSite - the baseSite of the ProductInterestpublic void removeAllProductInterests(java.lang.String productCode)
ProductInterestServiceremoveAllProductInterests in interface ProductInterestServiceproductCode - the code of the productpublic java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>> getProductsByCustomerInterests(PageableData pageableData)
ProductInterestServicegetProductsByCustomerInterests in interface ProductInterestServicepageableData - the pagination datapublic java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>> findProductInterestsByCustomer()
ProductInterestServicefindProductInterestsByCustomer in interface ProductInterestServicepublic int getProductsCountByCustomerInterests(PageableData pageableData)
ProductInterestServicegetProductsCountByCustomerInterests in interface ProductInterestServicepageableData - the pagination dataprotected void fillProductModelMap(java.util.Map<ProductModel,java.util.Map<NotificationType,java.util.Date>> productModelMap, java.lang.String productPk, java.util.Map<java.lang.String,java.lang.String> interestCreationMap)
protected java.util.Map<NotificationType,java.util.Date> buildInterestMap(java.util.Map<java.lang.String,java.lang.String> interestCreationMap)
interestCreationMap - protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected ProductInterestDao getProductInterestDao()
public void setProductInterestDao(ProductInterestDao productInterestDao)
protected UserService getUserService()
public void setUserService(UserService userService)
protected BaseStoreService getBaseStoreService()
public void setBaseStoreService(BaseStoreService baseStoreService)
protected BaseSiteService getBaseSiteService()
public void setBaseSiteService(BaseSiteService baseSiteService)
Copyright © 2018 SAP SE. All Rights Reserved.