public class DefaultCommerceQuoteDao extends DefaultGenericDao<QuoteModel> implements CommerceQuoteDao
CommerceQuoteDao interface extending DefaultGenericDao| Constructor and Description |
|---|
DefaultCommerceQuoteDao() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
createQuery(java.lang.String... queryClauses) |
protected SortQueryData |
createSortQueryData(java.lang.String sortCode,
java.lang.String query) |
SearchPageData<QuoteModel> |
findQuotesByCustomerAndStore(CustomerModel customerModel,
BaseStoreModel store,
PageableData pageableData,
java.util.Set<QuoteState> quoteStates)
Returns a paged list of maximum version (i.e.
|
SearchResult<QuoteModel> |
findQuotesExpired(java.util.Date currentDate,
QuoteNotificationType notificationType,
java.util.Set<QuoteState> quoteStates)
Returns a list of active (last version) quotes filtered by given statuses which are expired
|
SearchResult<QuoteModel> |
findQuotesSoonToExpire(java.util.Date expiredAfter,
java.util.Date expiredBy,
QuoteNotificationType notificationType,
java.util.Set<QuoteState> quoteStates)
Returns a list of active (last version) quotes filtered by given statuses which will expire by the specified date
|
QuoteModel |
findUniqueQuoteByCodeAndCustomerAndStore(CustomerModel customerModel,
BaseStoreModel store,
java.lang.String quoteCode,
java.util.Set<QuoteState> quoteStates)
Returns a unique quote of maximum version (i.e.
|
protected PagedFlexibleSearchService |
getPagedFlexibleSearchService() |
java.lang.Integer |
getQuotesCountForCustomerAndStore(CustomerModel customerModel,
BaseStoreModel store,
java.util.Set<QuoteState> quoteStates)
Returns the total number of quotes for the specified user and store.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
populateBasicQueryParams(BaseStoreModel store,
CustomerModel customerModel,
java.util.Set<QuoteState> quoteStates) |
void |
setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService) |
protected void |
validateQuoteStateList(java.util.Set<QuoteState> quoteStates,
java.lang.String msg) |
protected void |
validateUserAndStoreAndStates(BaseStoreModel store,
CustomerModel customerModel,
java.util.Set<QuoteState> quoteStates) |
find, find, find, find, find, getFlexibleSearchService, setFlexibleSearchServicepublic SearchPageData<QuoteModel> findQuotesByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, PageableData pageableData, java.util.Set<QuoteState> quoteStates)
CommerceQuoteDaofindQuotesByCustomerAndStore in interface CommerceQuoteDaocustomerModel - the customer to retrieve quotes forstore - the store to retrieve quotes forpageableData - the pagination settingsquoteStates - the quote states the user can accesspublic SearchResult<QuoteModel> findQuotesSoonToExpire(java.util.Date expiredAfter, java.util.Date expiredBy, QuoteNotificationType notificationType, java.util.Set<QuoteState> quoteStates)
CommerceQuoteDaofindQuotesSoonToExpire in interface CommerceQuoteDaoexpiredAfter - 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 accesspublic SearchResult<QuoteModel> findQuotesExpired(java.util.Date currentDate, QuoteNotificationType notificationType, java.util.Set<QuoteState> quoteStates)
CommerceQuoteDaofindQuotesExpired in interface CommerceQuoteDaocurrentDate - 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 accesspublic QuoteModel findUniqueQuoteByCodeAndCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, java.lang.String quoteCode, java.util.Set<QuoteState> quoteStates)
CommerceQuoteDaofindUniqueQuoteByCodeAndCustomerAndStore in interface CommerceQuoteDaocustomerModel - the customer to retrieve quotes forstore - the store to retrieve quotes forquoteCode - the quote code to search forquoteStates - the quote states the user can accesspublic java.lang.Integer getQuotesCountForCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, java.util.Set<QuoteState> quoteStates)
CommerceQuoteDaogetQuotesCountForCustomerAndStore in interface CommerceQuoteDaocustomerModel - the customer to get the quote count forstore - the store to get the quote count forquoteStates - the list of states the user can accessprotected java.util.Map<java.lang.String,java.lang.Object> populateBasicQueryParams(BaseStoreModel store, CustomerModel customerModel, java.util.Set<QuoteState> quoteStates)
protected void validateUserAndStoreAndStates(BaseStoreModel store, CustomerModel customerModel, java.util.Set<QuoteState> quoteStates)
protected void validateQuoteStateList(java.util.Set<QuoteState> quoteStates, java.lang.String msg)
protected SortQueryData createSortQueryData(java.lang.String sortCode, java.lang.String query)
protected java.lang.String createQuery(java.lang.String... queryClauses)
protected PagedFlexibleSearchService getPagedFlexibleSearchService()
public void setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
Copyright © 2018 SAP SE. All Rights Reserved.