Class DefaultCustomerAccountDao
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
-
- de.hybris.platform.commerceservices.customer.dao.impl.DefaultCustomerAccountDao
-
- All Implemented Interfaces:
CustomerAccountDao
,Dao
- Direct Known Subclasses:
DefaultSubscriptionCustomerAccountDao
public class DefaultCustomerAccountDao extends AbstractItemDao implements CustomerAccountDao
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
FILTER_RETURNREQUESTS_STATUS
protected static java.lang.String
FIND_RETURNREQUESTS_BY_CUSTOMER_STORE_QUERY
protected static java.lang.String
FIND_RETURNREQUESTS_BY_CUSTOMER_STORE_QUERY_AND_STATUS
protected static java.lang.String
SORT_RETURNREQUESTS_BY_DATE
protected static java.lang.String
SORT_RETURNREQUESTS_BY_RMA
-
Fields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService
-
-
Constructor Summary
Constructors Constructor Description DefaultCustomerAccountDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
createQuery(java.lang.String... queryClauses)
protected SortQueryData
createSortQueryData(java.lang.String sortCode, java.lang.String query)
java.util.List<AddressModel>
findAddressBookDeliveryEntriesForCustomer(CustomerModel customerModel, java.util.Collection<CountryModel> deliveryCountries)
Find address book delivery entries for customer.CreditCardPaymentInfoModel
findCreditCardPaymentInfoByCustomer(CustomerModel customerModel, java.lang.String code)
Retrieves the customer's credit card payment infojava.util.List<CreditCardPaymentInfoModel>
findCreditCardPaymentInfosByCustomer(CustomerModel customerModel, boolean saved)
Retrieves the customer's list of credit card payment infosOrderModel
findOrderByCodeAndStore(java.lang.String code, BaseStoreModel store)
Retrieves the order by order code and base storeOrderModel
findOrderByCustomerAndCodeAndStore(CustomerModel customerModel, java.lang.String code, BaseStoreModel store)
Finds the specified order for the specified user in the current session's active catalog versionsOrderModel
findOrderByGUIDAndStore(java.lang.String guid, BaseStoreModel store, java.util.Date expiryDate)
Finds the specified order for the specified user in the current session's active catalog versionsjava.util.List<OrderModel>
findOrdersByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status)
Finds orders for the specified user in the current session's active catalog versionsSearchPageData<OrderModel>
findOrdersByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status, PageableData pageableData)
Finds orders for the specified user in the current session's active catalog versionsSearchPageData<ReturnRequestModel>
findReturnRequestsByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, ReturnStatus[] returnStatuses, PageableData pageableData)
Returns theReturnRequestModel
of the given user filtered by given list ofReturnStatus
(s).protected java.util.List<OrderStatus>
getFilterOrderStatusList()
protected java.util.List<ReturnStatus>
getFilterReturnStatusList()
protected PagedFlexibleSearchService
getPagedFlexibleSearchService()
void
setFilterOrderStatusList(java.util.List<OrderStatus> filterOrderStatusList)
Optional list ofOrderStatus
values to be filtered.void
setFilterReturnStatusList(java.util.List<ReturnStatus> filterReturnStatusList)
Optional list ofReturnStatus
values to be filtered.void
setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
-
Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
-
-
-
Field Detail
-
FIND_RETURNREQUESTS_BY_CUSTOMER_STORE_QUERY
protected static final java.lang.String FIND_RETURNREQUESTS_BY_CUSTOMER_STORE_QUERY
- See Also:
- Constant Field Values
-
FIND_RETURNREQUESTS_BY_CUSTOMER_STORE_QUERY_AND_STATUS
protected static final java.lang.String FIND_RETURNREQUESTS_BY_CUSTOMER_STORE_QUERY_AND_STATUS
- See Also:
- Constant Field Values
-
FILTER_RETURNREQUESTS_STATUS
protected static final java.lang.String FILTER_RETURNREQUESTS_STATUS
- See Also:
- Constant Field Values
-
SORT_RETURNREQUESTS_BY_DATE
protected static final java.lang.String SORT_RETURNREQUESTS_BY_DATE
- See Also:
- Constant Field Values
-
SORT_RETURNREQUESTS_BY_RMA
protected static final java.lang.String SORT_RETURNREQUESTS_BY_RMA
- See Also:
- Constant Field Values
-
-
Method Detail
-
findOrderByCustomerAndCodeAndStore
public OrderModel findOrderByCustomerAndCodeAndStore(CustomerModel customerModel, java.lang.String code, BaseStoreModel store)
Description copied from interface:CustomerAccountDao
Finds the specified order for the specified user in the current session's active catalog versions- Specified by:
findOrderByCustomerAndCodeAndStore
in interfaceCustomerAccountDao
- Parameters:
customerModel
- the customercode
- the code representing the orderstore
- The current store- Returns:
- The order found
-
findOrderByCodeAndStore
public OrderModel findOrderByCodeAndStore(java.lang.String code, BaseStoreModel store)
Description copied from interface:CustomerAccountDao
Retrieves the order by order code and base store- Specified by:
findOrderByCodeAndStore
in interfaceCustomerAccountDao
- Parameters:
code
- order codestore
- store- Returns:
- order details
-
findOrderByGUIDAndStore
public OrderModel findOrderByGUIDAndStore(java.lang.String guid, BaseStoreModel store, java.util.Date expiryDate)
Description copied from interface:CustomerAccountDao
Finds the specified order for the specified user in the current session's active catalog versions- Specified by:
findOrderByGUIDAndStore
in interfaceCustomerAccountDao
- Parameters:
guid
- the guid representing the orderstore
- the current storeexpiryDate
- Order expiration date- Returns:
- the order
-
findOrdersByCustomerAndStore
public java.util.List<OrderModel> findOrdersByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status)
Description copied from interface:CustomerAccountDao
Finds orders for the specified user in the current session's active catalog versions- Specified by:
findOrdersByCustomerAndStore
in interfaceCustomerAccountDao
- 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
public SearchPageData<OrderModel> findOrdersByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, OrderStatus[] status, PageableData pageableData)
Description copied from interface:CustomerAccountDao
Finds orders for the specified user in the current session's active catalog versions- Specified by:
findOrdersByCustomerAndStore
in interfaceCustomerAccountDao
- 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
public SearchPageData<ReturnRequestModel> findReturnRequestsByCustomerAndStore(CustomerModel customerModel, BaseStoreModel store, ReturnStatus[] returnStatuses, PageableData pageableData)
Description copied from interface:CustomerAccountDao
Returns theReturnRequestModel
of the given user filtered by given list ofReturnStatus
(s).- Specified by:
findReturnRequestsByCustomerAndStore
in interfaceCustomerAccountDao
- Parameters:
customerModel
- theCustomerModel
to retrieve return requests forstore
- the currentBaseStoreModel
returnStatuses
- 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
public java.util.List<CreditCardPaymentInfoModel> findCreditCardPaymentInfosByCustomer(CustomerModel customerModel, boolean saved)
Description copied from interface:CustomerAccountDao
Retrieves the customer's list of credit card payment infos- Specified by:
findCreditCardPaymentInfosByCustomer
in interfaceCustomerAccountDao
- Parameters:
customerModel
- the customersaved
-true
to retrieve only saved credit card payment infos- Returns:
- the list of credit card payment infos
-
findCreditCardPaymentInfoByCustomer
public CreditCardPaymentInfoModel findCreditCardPaymentInfoByCustomer(CustomerModel customerModel, java.lang.String code)
Description copied from interface:CustomerAccountDao
Retrieves the customer's credit card payment info- Specified by:
findCreditCardPaymentInfoByCustomer
in interfaceCustomerAccountDao
- Parameters:
customerModel
- the customercode
- the code of the credit card payment info- Returns:
- the credit card payment info
-
findAddressBookDeliveryEntriesForCustomer
public java.util.List<AddressModel> findAddressBookDeliveryEntriesForCustomer(CustomerModel customerModel, java.util.Collection<CountryModel> deliveryCountries)
Description copied from interface:CustomerAccountDao
Find address book delivery entries for customer.- Specified by:
findAddressBookDeliveryEntriesForCustomer
in interfaceCustomerAccountDao
- Parameters:
customerModel
- the customer modeldeliveryCountries
- the delivery countries- Returns:
- the list of delivery address
-
createSortQueryData
protected SortQueryData createSortQueryData(java.lang.String sortCode, java.lang.String query)
-
createQuery
protected java.lang.String createQuery(java.lang.String... queryClauses)
-
getPagedFlexibleSearchService
protected PagedFlexibleSearchService getPagedFlexibleSearchService()
-
setPagedFlexibleSearchService
public void setPagedFlexibleSearchService(PagedFlexibleSearchService pagedFlexibleSearchService)
-
getFilterOrderStatusList
protected java.util.List<OrderStatus> getFilterOrderStatusList()
-
setFilterOrderStatusList
public void setFilterOrderStatusList(java.util.List<OrderStatus> filterOrderStatusList)
Optional list ofOrderStatus
values to be filtered.
-
getFilterReturnStatusList
protected java.util.List<ReturnStatus> getFilterReturnStatusList()
-
setFilterReturnStatusList
public void setFilterReturnStatusList(java.util.List<ReturnStatus> filterReturnStatusList)
Optional list ofReturnStatus
values to be filtered.
-
-