Class DefaultCommerceCartDao
java.lang.Object
de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
de.hybris.platform.commerceservices.order.dao.impl.DefaultCommerceCartDao
- All Implemented Interfaces:
CommerceCartDao,Dao
- Direct Known Subclasses:
DefaultSaveCartDao,DefaultSubscriptionCommerceCartDao
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
flexibleSearchService, modelService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> FlexibleSearchQueryprotected <T> List<T>Search for all.protected <T> List<T>Do search with count.getCartForCodeAndUser(String code, UserModel user) Gets the cart for code and user.getCartForGuidAndSite(String guid, BaseSiteModel site) Gets the cart for guid and site.getCartForGuidAndSiteAndUser(String guid, BaseSiteModel site, UserModel user) Gets the cart for guid and site and user.getCartForSiteAndUser(BaseSiteModel site, UserModel user) Gets the cart for site and user.getCartsForRemovalForSiteAndUser(Date modifiedBefore, BaseSiteModel site, UserModel user) Gets the carts for removal for site and user.getCartsForSiteAndUser(BaseSiteModel site, UserModel user) Gets the carts for site and user.Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao
getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
-
Field Details
-
SELECTCLAUSE
- See Also:
-
ORDERBYCLAUSE
- See Also:
-
NOT_SAVED_CART_CLAUSE
- See Also:
-
NOT_QUOTE_CART_CLAUSE
- See Also:
-
FIND_CART_FOR_CODE_AND_SITE
- See Also:
-
FIND_CART_FOR_USER_AND_SITE
- See Also:
-
FIND_CART_FOR_GUID_AND_USER_AND_SITE
- See Also:
-
FIND_CART_FOR_GUID_AND_SITE
- See Also:
-
FIND_CARTS_FOR_SITE_AND_USER
- See Also:
-
FIND_CART_FOR_SITE_AND_USER_AND_EXCLUDED_GUID
- See Also:
-
FIND_OLD_CARTS_FOR_SITE
- See Also:
-
FIND_OLD_CARTS_FOR_SITE_AND_USER
- See Also:
-
FIND_EXPIRED_SAVED_CARTS_FOR_SITE_AND_USER
- See Also:
-
-
Constructor Details
-
DefaultCommerceCartDao
public DefaultCommerceCartDao()
-
-
Method Details
-
getCartForCodeAndUser
Description copied from interface:CommerceCartDaoGets the cart for code and user.- Specified by:
getCartForCodeAndUserin interfaceCommerceCartDao- Parameters:
code- the codeuser- the user- Returns:
- the cart for code and user
-
getCartForSiteAndUser
Description copied from interface:CommerceCartDaoGets the cart for site and user. Excluding saved carts and quote carts. To get save cart, useSaveCartDao.getSavedCartsForSiteAndUser(de.hybris.platform.commerceservices.search.pagedata.PageableData, BaseSiteModel, UserModel, List)- Specified by:
getCartForSiteAndUserin interfaceCommerceCartDao- Parameters:
site- the siteuser- the user- Returns:
- the cart for site and user
-
getCartForGuidAndSiteAndUser
Description copied from interface:CommerceCartDaoGets the cart for guid and site and user.- Specified by:
getCartForGuidAndSiteAndUserin interfaceCommerceCartDao- Parameters:
guid- the guidsite- the siteuser- the user- Returns:
- the cart for guid and site and user
-
getCartForGuidAndSite
Description copied from interface:CommerceCartDaoGets the cart for guid and site.- Specified by:
getCartForGuidAndSitein interfaceCommerceCartDao- Parameters:
guid- the guidsite- the site- Returns:
- the cart for guid and site
-
getCartsForSiteAndUser
Description copied from interface:CommerceCartDaoGets the carts for site and user. Excluding saved carts and quote carts. To get save cart, useSaveCartDao.getSavedCartsForSiteAndUser(de.hybris.platform.commerceservices.search.pagedata.PageableData, BaseSiteModel, UserModel, List)- Specified by:
getCartsForSiteAndUserin interfaceCommerceCartDao- Parameters:
site- the siteuser- the user- Returns:
- the carts for site and user
-
getCartsForRemovalForSiteAndUser
public List<CartModel> getCartsForRemovalForSiteAndUser(Date modifiedBefore, BaseSiteModel site, UserModel user) Description copied from interface:CommerceCartDaoGets the carts for removal for site and user. Excluding saved carts. To get save cart for removal, useSaveCartDao.getSavedCartsForRemovalForSite(BaseSiteModel)- Specified by:
getCartsForRemovalForSiteAndUserin interfaceCommerceCartDao- Parameters:
modifiedBefore- the modified beforesite- the siteuser- the user- Returns:
- the carts for removal for site and user
-
doSearch
Search for all.- Type Parameters:
T- the generic type- Parameters:
query- the queryparams- the paramsresultClass- the result class- Returns:
- the list
-
doSearch
protected <T> List<T> doSearch(String query, Map<String, Object> params, Class<T> resultClass, int count) Do search with count. For example, if set count to 1, only the first one of the result will be returned.- Type Parameters:
T- the generic type- Parameters:
query- the queryparams- the paramsresultClass- the result classcount- the count- Returns:
- the list
-
createSearchQuery
-