Interface CustomerAccountDao

All Superinterfaces:
Dao
All Known Implementing Classes:
DefaultCustomerAccountDao, DefaultSubscriptionCustomerAccountDao

public interface CustomerAccountDao extends Dao
Data Access Object for looking up items related to the Customer's account.
  • Method Details

    • findOrderByCustomerAndCodeAndStore

      OrderModel findOrderByCustomerAndCodeAndStore(CustomerModel customerModel, String code, BaseStoreModel store)
      Finds the specified order for the specified user in the current session's active catalog versions
      Parameters:
      customerModel - the customer
      code - the code representing the order
      store - The current store
      Returns:
      The order found
      Throws:
      ModelNotFoundException - if nothing was found
      AmbiguousIdentifierException - if by the given search params to many models where found
    • findOrderByGUIDAndStore

      OrderModel findOrderByGUIDAndStore(String guid, BaseStoreModel store, Date expiryDate)
      Finds the specified order for the specified user in the current session's active catalog versions
      Parameters:
      guid - the guid representing the order
      store - the current store
      expiryDate - Order expiration date
      Returns:
      the order
      Throws:
      ModelNotFoundException - if nothing was found
      AmbiguousIdentifierException - if by the given search params to many models where found
    • findOrdersByCustomerAndStore

      List<OrderModel> findOrdersByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status)
      Finds orders for the specified user in the current session's active catalog versions
      Parameters:
      customerModel - the customer
      store - The current store
      status - A list of order statuses to include in the result, if null or empty then all statuses are included
      Returns:
      The list of orders owned by the customer associated with the store
    • findOrdersByCustomerAndStore

      SearchPageData<OrderModel> findOrdersByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status, PageableData pageableData)
      Finds orders for the specified user in the current session's active catalog versions
      Parameters:
      customerModel - the customer
      store - The current store
      status - A list of order statuses to include in the result, if null or empty then all statuses are included
      pageableData - The pagination data
      Returns:
      The list of orders owned by the customer associated with the store
    • findReturnRequestsByCustomerAndStore

      SearchPageData<ReturnRequestModel> findReturnRequestsByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, ReturnStatus[] returnStatuses, PageableData pageableData)
      Returns the ReturnRequestModel of the given user filtered by given list of ReturnStatus(s).
      Parameters:
      customerModel - the CustomerModel to retrieve return requests for
      store - the current BaseStoreModel
      returnStatuses - the ReturnStatus(s) to be included in the result. If null or empty then all statuses are included
      pageableData - pagination information
      Returns:
      the list of ReturnRequestModel
    • findCreditCardPaymentInfosByCustomer

      List<CreditCardPaymentInfoModel> findCreditCardPaymentInfosByCustomer(CustomerModel customerModel, boolean saved)
      Retrieves the customer's list of credit card payment infos
      Parameters:
      customerModel - the customer
      saved - true to retrieve only saved credit card payment infos
      Returns:
      the list of credit card payment infos
    • findCreditCardPaymentInfoByCustomer

      CreditCardPaymentInfoModel findCreditCardPaymentInfoByCustomer(CustomerModel customerModel, String code)
      Retrieves the customer's credit card payment info
      Parameters:
      customerModel - the customer
      code - the code of the credit card payment info
      Returns:
      the credit card payment info
    • findOrderByCodeAndStore

      OrderModel findOrderByCodeAndStore(String code, BaseStoreModel store)
      Retrieves the order by order code and base store
      Parameters:
      code - order code
      store - store
      Returns:
      order details
    • findAddressBookDeliveryEntriesForCustomer

      List<AddressModel> findAddressBookDeliveryEntriesForCustomer(CustomerModel customerModel, Collection<CountryModel> deliveryCountries)
      Find address book delivery entries for customer.
      Parameters:
      customerModel - the customer model
      deliveryCountries - the delivery countries
      Returns:
      the list of delivery address