Class DefaultCustomerReviewDao
java.lang.Object
de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
de.hybris.platform.customerreview.dao.impl.DefaultCustomerReviewDao
- All Implemented Interfaces:
CustomerReviewDao,Dao
Default implementation of
CustomerReviewDao-
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAverageRating(ProductModel product) Calculates the average rating for a product.getNumberOfReviews(ProductModel product) Get number of all reviews in any language for the specified product.getReviewsForCustomer(UserModel customer) Get the reviews for the specified customer.getReviewsForProduct(ProductModel product) Get the reviews for the specified product.getReviewsForProductAndLanguage(ProductModel product, LanguageModel language) Get the reviews for the specified product in the specified language.Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
Constructor Details
-
DefaultCustomerReviewDao
public DefaultCustomerReviewDao()
-
-
Method Details
-
getReviewsForProduct
Description copied from interface:CustomerReviewDaoGet the reviews for the specified product. Gets all the reviews in any language. The reviews are ordered by creation date with the most recent first.- Specified by:
getReviewsForProductin interfaceCustomerReviewDao- Parameters:
product- the product- Returns:
- the reviews
-
getReviewsForProductAndLanguage
public List<CustomerReviewModel> getReviewsForProductAndLanguage(ProductModel product, LanguageModel language) Description copied from interface:CustomerReviewDaoGet the reviews for the specified product in the specified language. The reviews are ordered by creation date with the most recent first.- Specified by:
getReviewsForProductAndLanguagein interfaceCustomerReviewDao- Parameters:
product- the productlanguage- the language- Returns:
- the reviews
-
getReviewsForCustomer
Description copied from interface:CustomerReviewDaoGet the reviews for the specified customer. Gets all the reviews in any language. The reviews are ordered by created date with the most recent first.- Specified by:
getReviewsForCustomerin interfaceCustomerReviewDao- Parameters:
customer- the customer- Returns:
- the reviews
-
getNumberOfReviews
Description copied from interface:CustomerReviewDaoGet number of all reviews in any language for the specified product.- Specified by:
getNumberOfReviewsin interfaceCustomerReviewDao- Parameters:
product- the product- Returns:
- the number of reviews
-
getAverageRating
Description copied from interface:CustomerReviewDaoCalculates the average rating for a product.- Specified by:
getAverageRatingin interfaceCustomerReviewDao- Parameters:
product- the Product for which the average rating shall be calculated- Returns:
- the average of all ratings for the given product
-