Class DefaultCustomerVendorReviewDao
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao<CustomerVendorReviewModel>
-
- de.hybris.platform.marketplaceservices.vendor.daos.impl.DefaultCustomerVendorReviewDao
-
- All Implemented Interfaces:
CustomerVendorReviewDao,GenericDao<CustomerVendorReviewModel>
public class DefaultCustomerVendorReviewDao extends DefaultGenericDao<CustomerVendorReviewModel> implements CustomerVendorReviewDao
Default implementation forCustomerVendorReviewDao.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringAPPROVAL_STATUSprotected static java.lang.StringCONSIGNMENT_CODEprotected static java.lang.StringFIND_REVIEWSprotected static java.lang.StringFIND_REVIEWS_FOR_CURRENT_LANGUAGEprotected static java.lang.StringPOSTED_REVIEWprotected static java.lang.StringUIDprotected static java.lang.StringVENDOR_CODE
-
Constructor Summary
Constructors Constructor Description DefaultCustomerVendorReviewDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SortQueryDatacreateSortQueryData(java.lang.String sortCode, java.lang.String query)SearchPageData<CustomerVendorReviewModel>findPagedReviewsForVendor(java.lang.String vendorCode, LanguageModel language, PageableData pageableData)Find all approved paged reviews for a particular vendorjava.util.Collection<CustomerVendorReviewModel>findReviewsByUser(UserModel user)Find all reviews for a particular userjava.util.Collection<CustomerVendorReviewModel>findReviewsForVendor(VendorModel vendor)Find all approved reviews for a particular vendorprotected PagedFlexibleSearchServicegetPagedFlexibleSearchService()booleanpostedReview(java.lang.String consignmentCode, UserModel user)Check whether the review has been postedvoidsetPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)-
Methods inherited from class de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao
find, find, find, find, find, getFlexibleSearchService, setFlexibleSearchService
-
-
-
-
Field Detail
-
VENDOR_CODE
protected static final java.lang.String VENDOR_CODE
- See Also:
- Constant Field Values
-
APPROVAL_STATUS
protected static final java.lang.String APPROVAL_STATUS
- See Also:
- Constant Field Values
-
CONSIGNMENT_CODE
protected static final java.lang.String CONSIGNMENT_CODE
- See Also:
- Constant Field Values
-
UID
protected static final java.lang.String UID
- See Also:
- Constant Field Values
-
FIND_REVIEWS
protected static final java.lang.String FIND_REVIEWS
- See Also:
- Constant Field Values
-
FIND_REVIEWS_FOR_CURRENT_LANGUAGE
protected static final java.lang.String FIND_REVIEWS_FOR_CURRENT_LANGUAGE
- See Also:
- Constant Field Values
-
POSTED_REVIEW
protected static final java.lang.String POSTED_REVIEW
- See Also:
- Constant Field Values
-
-
Method Detail
-
findReviewsForVendor
public java.util.Collection<CustomerVendorReviewModel> findReviewsForVendor(VendorModel vendor)
Description copied from interface:CustomerVendorReviewDaoFind all approved reviews for a particular vendor- Specified by:
findReviewsForVendorin interfaceCustomerVendorReviewDao- Returns:
- all approved reviews for this vendor
-
postedReview
public boolean postedReview(java.lang.String consignmentCode, UserModel user)Description copied from interface:CustomerVendorReviewDaoCheck whether the review has been posted- Specified by:
postedReviewin interfaceCustomerVendorReviewDao- Parameters:
consignmentCode- consignment codeuser- User model- Returns:
- true if a review has been posted and false otherwise
-
findPagedReviewsForVendor
public SearchPageData<CustomerVendorReviewModel> findPagedReviewsForVendor(java.lang.String vendorCode, LanguageModel language, PageableData pageableData)
Description copied from interface:CustomerVendorReviewDaoFind all approved paged reviews for a particular vendor- Specified by:
findPagedReviewsForVendorin interfaceCustomerVendorReviewDao- Parameters:
vendorCode- code of vendorlanguage- current languagepageableData- the pagination data- Returns:
- paging result of reviews
-
findReviewsByUser
public java.util.Collection<CustomerVendorReviewModel> findReviewsByUser(UserModel user)
Description copied from interface:CustomerVendorReviewDaoFind all reviews for a particular user- Specified by:
findReviewsByUserin interfaceCustomerVendorReviewDao- Parameters:
user- the given user- Returns:
- all reviews for this user
-
createSortQueryData
protected SortQueryData createSortQueryData(java.lang.String sortCode, java.lang.String query)
-
getPagedFlexibleSearchService
protected PagedFlexibleSearchService getPagedFlexibleSearchService()
-
setPagedFlexibleSearchService
public void setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
-
-