Class DefaultCommerceQuoteDao
java.lang.Object
de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao<QuoteModel>
de.hybris.platform.commerceservices.order.dao.impl.DefaultCommerceQuoteDao
- All Implemented Interfaces:
CommerceQuoteDao,GenericDao<QuoteModel>
public class DefaultCommerceQuoteDao
extends DefaultGenericDao<QuoteModel>
implements CommerceQuoteDao
Default implementation of
CommerceQuoteDao interface extending DefaultGenericDao-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateQuery(String... queryClauses) protected SortQueryDatacreateSortQueryData(String sortCode, String query) findQuotesByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, PageableData pageableData, Set<QuoteState> quoteStates) Returns a paged list of maximum version (i.e.findQuotesExpired(Date currentDate, QuoteNotificationType notificationType, Set<QuoteState> quoteStates) Returns a list of active (last version) quotes filtered by given statuses which are expiredfindQuotesSoonToExpire(Date expiredAfter, Date expiredBy, QuoteNotificationType notificationType, Set<QuoteState> quoteStates) Returns a list of active (last version) quotes filtered by given statuses which will expire by the specified datefindUniqueQuoteByCodeAndCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, String quoteCode, Set<QuoteState> quoteStates) Returns a unique quote of maximum version (i.e.protected PagedFlexibleSearchServicegetQuotesCountForCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, Set<QuoteState> quoteStates) Returns the total number of quotes for the specified user and store.populateBasicQueryParams(BaseStoreModel store, CustomerModel customerModel, Set<QuoteState> quoteStates) voidsetPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService) protected voidvalidateQuoteStateList(Set<QuoteState> quoteStates, String msg) protected voidvalidateUserAndStoreAndStates(BaseStoreModel store, CustomerModel customerModel, Set<QuoteState> quoteStates) Methods inherited from class de.hybris.platform.servicelayer.internal.dao.DefaultGenericDao
find, find, find, find, find, getFlexibleSearchService, setFlexibleSearchService
-
Constructor Details
-
DefaultCommerceQuoteDao
public DefaultCommerceQuoteDao()
-
-
Method Details
-
findQuotesByCustomerAndStore
public SearchPageData<QuoteModel> findQuotesByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, PageableData pageableData, Set<QuoteState> quoteStates) Description copied from interface:CommerceQuoteDaoReturns a paged list of maximum version (i.e. active quotes) of each quote for the specified user & store, filtered by accessible quote states.- Specified by:
findQuotesByCustomerAndStorein interfaceCommerceQuoteDao- Parameters:
customerModel- the customer to retrieve quotes forstore- the store to retrieve quotes forpageableData- the pagination settingsquoteStates- the quote states the user can access- Returns:
- the paged search result
-
findQuotesSoonToExpire
public SearchResult<QuoteModel> findQuotesSoonToExpire(Date expiredAfter, Date expiredBy, QuoteNotificationType notificationType, Set<QuoteState> quoteStates) Description copied from interface:CommerceQuoteDaoReturns a list of active (last version) quotes filtered by given statuses which will expire by the specified date- Specified by:
findQuotesSoonToExpirein interfaceCommerceQuoteDao- Parameters:
expiredAfter- the date after which the quote is going to expireexpiredBy- the date before which the quote is going to expirenotificationType- the quote notification, for which we are getting quotes (quotes which have this notification set will be excluded from the results)quoteStates- the quote states the user can access- Returns:
- the paged search result
-
findQuotesExpired
public SearchResult<QuoteModel> findQuotesExpired(Date currentDate, QuoteNotificationType notificationType, Set<QuoteState> quoteStates) Description copied from interface:CommerceQuoteDaoReturns a list of active (last version) quotes filtered by given statuses which are expired- Specified by:
findQuotesExpiredin interfaceCommerceQuoteDao- Parameters:
currentDate- the current datenotificationType- the quote notification, for which we are getting quotes (quotes which have this notification set will be excluded from the results)quoteStates- the quote states the user can access- Returns:
- the paged search result
-
findUniqueQuoteByCodeAndCustomerAndStore
public QuoteModel findUniqueQuoteByCodeAndCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, String quoteCode, Set<QuoteState> quoteStates) Description copied from interface:CommerceQuoteDaoReturns a unique quote of maximum version (i.e. active quote) for the specified user, store & code, filtered by accessible quote states.- Specified by:
findUniqueQuoteByCodeAndCustomerAndStorein interfaceCommerceQuoteDao- Parameters:
customerModel- the customer to retrieve quotes forstore- the store to retrieve quotes forquoteCode- the quote code to search forquoteStates- the quote states the user can access- Returns:
- the unique quote matching the search parameters
-
getQuotesCountForCustomerAndStore
public Integer getQuotesCountForCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, Set<QuoteState> quoteStates) Description copied from interface:CommerceQuoteDaoReturns the total number of quotes for the specified user and store.- Specified by:
getQuotesCountForCustomerAndStorein interfaceCommerceQuoteDao- Parameters:
customerModel- the customer to get the quote count forstore- the store to get the quote count forquoteStates- the list of states the user can access- Returns:
- the quote count
-
populateBasicQueryParams
protected Map<String,Object> populateBasicQueryParams(BaseStoreModel store, CustomerModel customerModel, Set<QuoteState> quoteStates) -
validateUserAndStoreAndStates
protected void validateUserAndStoreAndStates(BaseStoreModel store, CustomerModel customerModel, Set<QuoteState> quoteStates) -
validateQuoteStateList
-
createSortQueryData
-
createQuery
-
getPagedFlexibleSearchService
-
setPagedFlexibleSearchService
-