Interface CommerceQuoteDao
-
- All Superinterfaces:
GenericDao<QuoteModel>
- All Known Implementing Classes:
DefaultCommerceQuoteDao
public interface CommerceQuoteDao extends GenericDao<QuoteModel>
DAO interface for handlingQuoteModel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 quoteNotificationType, java.util.Set<QuoteState> quoteStates)Returns a list of active (last version) quotes filtered by given statuses which are expiredSearchResult<QuoteModel>findQuotesSoonToExpire(java.util.Date expiredAfter, java.util.Date expiredBy, QuoteNotificationType quoteNotificationType, java.util.Set<QuoteState> quoteStates)Returns a list of active (last version) quotes filtered by given statuses which will expire by the specified dateQuoteModelfindUniqueQuoteByCodeAndCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, java.lang.String quoteCode, java.util.Set<QuoteState> quoteStates)Returns a unique quote of maximum version (i.e.java.lang.IntegergetQuotesCountForCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, java.util.Set<QuoteState> quoteStates)Returns the total number of quotes for the specified user and store.
-
-
-
Method Detail
-
findQuotesByCustomerAndStore
SearchPageData<QuoteModel> findQuotesByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, PageableData pageableData, java.util.Set<QuoteState> quoteStates)
Returns a paged list of maximum version (i.e. active quotes) of each quote for the specified user & store, filtered by accessible quote states.- 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
- Throws:
java.lang.IllegalArgumentException- if any of the parameters is null or the set of quote states is empty
-
findQuotesSoonToExpire
SearchResult<QuoteModel> findQuotesSoonToExpire(java.util.Date expiredAfter, java.util.Date expiredBy, QuoteNotificationType quoteNotificationType, java.util.Set<QuoteState> quoteStates)
Returns a list of active (last version) quotes filtered by given statuses which will expire by the specified date- Parameters:
expiredAfter- the date after which the quote is going to expireexpiredBy- the date before which the quote is going to expirequoteStates- the quote states the user can accessquoteNotificationType- the quote notification, for which we are getting quotes (quotes which have this notification set will be excluded from the results)- Returns:
- the paged search result
- Throws:
java.lang.IllegalArgumentException- if any of the parameters is null or the set of quote states is empty
-
findQuotesExpired
SearchResult<QuoteModel> findQuotesExpired(java.util.Date currentDate, QuoteNotificationType quoteNotificationType, java.util.Set<QuoteState> quoteStates)
Returns a list of active (last version) quotes filtered by given statuses which are expired- Parameters:
currentDate- the current datequoteStates- the quote states the user can accessquoteNotificationType- the quote notification, for which we are getting quotes (quotes which have this notification set will be excluded from the results)- Returns:
- the paged search result
- Throws:
java.lang.IllegalArgumentException- if any of the parameters is null or the set of quote states is empty
-
findUniqueQuoteByCodeAndCustomerAndStore
QuoteModel findUniqueQuoteByCodeAndCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, java.lang.String quoteCode, java.util.Set<QuoteState> quoteStates)
Returns a unique quote of maximum version (i.e. active quote) for the specified user, store & code, filtered by accessible quote states.- 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
- Throws:
java.lang.IllegalArgumentException- if any of the parameters is null or the set of quote states is emptyModelNotFoundException- if no results were foundAmbiguousIdentifierException- if more than one quote matches the search parameters
-
getQuotesCountForCustomerAndStore
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.- 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
- Throws:
java.lang.IllegalArgumentException- if any of the parameters is null or the set of quote states is empty
-
-