public class DefaultCustomerReviewService extends java.lang.Object implements CustomerReviewService
| Constructor and Description |
|---|
DefaultCustomerReviewService() |
| Modifier and Type | Method and Description |
|---|---|
CustomerReviewModel |
createCustomerReview(java.lang.Double rating,
java.lang.String headline,
java.lang.String comment,
UserModel user,
ProductModel product)
Creates a new customer review based on the given parameters
|
java.util.List<CustomerReviewModel> |
getAllReviews(ProductModel product)
Deprecated.
Since 6.4 use instead
CustomerReviewService.getReviewsForProduct(ProductModel) |
java.lang.Double |
getAverageRating(ProductModel product)
Returns the average rating of all reviews for the given product.
|
protected CustomerReviewDao |
getCustomerReviewDao() |
protected ModelService |
getModelService() |
java.lang.Integer |
getNumberOfReviews(ProductModel product)
Returns the number of reviews for the given product
|
java.util.List<CustomerReviewModel> |
getReviewsForCustomer(UserModel userModel)
Get the reviews for the specified customer.
|
java.util.List<CustomerReviewModel> |
getReviewsForProduct(ProductModel product)
Get the reviews for the specified product.
|
java.util.List<CustomerReviewModel> |
getReviewsForProductAndLanguage(ProductModel product,
LanguageModel language)
Get the reviews for the specified product in the specified language.
|
void |
setCustomerReviewDao(CustomerReviewDao customerReviewDao) |
void |
setModelService(ModelService modelService) |
void |
updateCustomerReview(CustomerReviewModel model,
UserModel user,
ProductModel product)
Deprecated.
Since 6.4 not required
|
public CustomerReviewModel createCustomerReview(java.lang.Double rating, java.lang.String headline, java.lang.String comment, UserModel user, ProductModel product)
CustomerReviewServicecreateCustomerReview in interface CustomerReviewServicerating - the ratingheadline - the headlinecomment - the commentsuser - the user who created the reviewproduct - the product reviewed@Deprecated public void updateCustomerReview(CustomerReviewModel model, UserModel user, ProductModel product)
CustomerReviewServiceupdateCustomerReview in interface CustomerReviewServicemodel - the review to updateuser - the userproduct - the product reviewed@Deprecated public java.util.List<CustomerReviewModel> getAllReviews(ProductModel product)
CustomerReviewService.getReviewsForProduct(ProductModel)CustomerReviewServicegetAllReviews in interface CustomerReviewServiceproduct - the product for which to return all reviewspublic java.lang.Double getAverageRating(ProductModel product)
CustomerReviewServicegetAverageRating in interface CustomerReviewServiceproduct - the productpublic java.lang.Integer getNumberOfReviews(ProductModel product)
CustomerReviewServicegetNumberOfReviews in interface CustomerReviewServiceproduct - instance of ProductModel to find the number of reviews forpublic java.util.List<CustomerReviewModel> getReviewsForProduct(ProductModel product)
CustomerReviewServicegetReviewsForProduct in interface CustomerReviewServiceproduct - the productpublic java.util.List<CustomerReviewModel> getReviewsForCustomer(UserModel userModel)
CustomerReviewServicegetReviewsForCustomer in interface CustomerReviewServiceuserModel - the customerpublic java.util.List<CustomerReviewModel> getReviewsForProductAndLanguage(ProductModel product, LanguageModel language)
CustomerReviewServicegetReviewsForProductAndLanguage in interface CustomerReviewServiceproduct - the productlanguage - the languageprotected CustomerReviewDao getCustomerReviewDao()
public void setCustomerReviewDao(CustomerReviewDao customerReviewDao)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
Copyright © 2018 SAP SE. All Rights Reserved.