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 Details

    • DefaultCommerceQuoteDao

      public DefaultCommerceQuoteDao()
  • Method Details

    • findQuotesByCustomerAndStore

      public SearchPageData<QuoteModel> findQuotesByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, PageableData pageableData, Set<QuoteState> quoteStates)
      Description copied from interface: CommerceQuoteDao
      Returns 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:
      findQuotesByCustomerAndStore in interface CommerceQuoteDao
      Parameters:
      customerModel - the customer to retrieve quotes for
      store - the store to retrieve quotes for
      pageableData - the pagination settings
      quoteStates - 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: CommerceQuoteDao
      Returns a list of active (last version) quotes filtered by given statuses which will expire by the specified date
      Specified by:
      findQuotesSoonToExpire in interface CommerceQuoteDao
      Parameters:
      expiredAfter - the date after which the quote is going to expire
      expiredBy - the date before which the quote is going to expire
      notificationType - 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: CommerceQuoteDao
      Returns a list of active (last version) quotes filtered by given statuses which are expired
      Specified by:
      findQuotesExpired in interface CommerceQuoteDao
      Parameters:
      currentDate - the current date
      notificationType - 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: CommerceQuoteDao
      Returns a unique quote of maximum version (i.e. active quote) for the specified user, store & code, filtered by accessible quote states.
      Specified by:
      findUniqueQuoteByCodeAndCustomerAndStore in interface CommerceQuoteDao
      Parameters:
      customerModel - the customer to retrieve quotes for
      store - the store to retrieve quotes for
      quoteCode - the quote code to search for
      quoteStates - 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: CommerceQuoteDao
      Returns the total number of quotes for the specified user and store.
      Specified by:
      getQuotesCountForCustomerAndStore in interface CommerceQuoteDao
      Parameters:
      customerModel - the customer to get the quote count for
      store - the store to get the quote count for
      quoteStates - 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

      protected void validateQuoteStateList(Set<QuoteState> quoteStates, String msg)
    • createSortQueryData

      protected SortQueryData createSortQueryData(String sortCode, String query)
    • createQuery

      protected String createQuery(String... queryClauses)
    • getPagedFlexibleSearchService

      protected PagedFlexibleSearchService getPagedFlexibleSearchService()
    • setPagedFlexibleSearchService

      public void setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)