Interface CustomerAccountDao
- All Superinterfaces:
Dao
- All Known Implementing Classes:
DefaultCustomerAccountDao,DefaultSubscriptionCustomerAccountDao
Data Access Object for looking up items related to the Customer's account.
-
Method Summary
Modifier and TypeMethodDescriptionfindAddressBookDeliveryEntriesForCustomer(CustomerModel customerModel, Collection<CountryModel> deliveryCountries) Find address book delivery entries for customer.findCreditCardPaymentInfoByCustomer(CustomerModel customerModel, String code) Retrieves the customer's credit card payment infofindCreditCardPaymentInfosByCustomer(CustomerModel customerModel, boolean saved) Retrieves the customer's list of credit card payment infosfindOrderByCodeAndStore(String code, BaseStoreModel store) Retrieves the order by order code and base storefindOrderByCustomerAndCodeAndStore(CustomerModel customerModel, String code, BaseStoreModel store) Finds the specified order for the specified user in the current session's active catalog versionsfindOrderByGUIDAndStore(String guid, BaseStoreModel store, Date expiryDate) Finds the specified order for the specified user in the current session's active catalog versionsfindOrdersByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status) Finds orders for the specified user in the current session's active catalog versionsfindOrdersByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status, PageableData pageableData) Finds orders for the specified user in the current session's active catalog versionsfindReturnRequestsByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, ReturnStatus[] returnStatuses, PageableData pageableData) Returns theReturnRequestModelof the given user filtered by given list ofReturnStatus(s).
-
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 customercode- the code representing the orderstore- The current store- Returns:
- The order found
- Throws:
ModelNotFoundException- if nothing was foundAmbiguousIdentifierException- if by the given search params to many models where found
-
findOrderByGUIDAndStore
Finds the specified order for the specified user in the current session's active catalog versions- Parameters:
guid- the guid representing the orderstore- the current storeexpiryDate- Order expiration date- Returns:
- the order
- Throws:
ModelNotFoundException- if nothing was foundAmbiguousIdentifierException- 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 customerstore- The current storestatus- 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 customerstore- The current storestatus- A list of order statuses to include in the result, if null or empty then all statuses are includedpageableData- 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 theReturnRequestModelof the given user filtered by given list ofReturnStatus(s).- Parameters:
customerModel- theCustomerModelto retrieve return requests forstore- the currentBaseStoreModelreturnStatuses- theReturnStatus(s) to be included in the result. If null or empty then all statuses are includedpageableData- 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 customersaved-trueto 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 customercode- the code of the credit card payment info- Returns:
- the credit card payment info
-
findOrderByCodeAndStore
Retrieves the order by order code and base store- Parameters:
code- order codestore- store- Returns:
- order details
-
findAddressBookDeliveryEntriesForCustomer
List<AddressModel> findAddressBookDeliveryEntriesForCustomer(CustomerModel customerModel, Collection<CountryModel> deliveryCountries) Find address book delivery entries for customer.- Parameters:
customerModel- the customer modeldeliveryCountries- the delivery countries- Returns:
- the list of delivery address
-