public interface EnterpriseOrderDao
Customer
instance. This cart retrieval is further enhanced with code to
detect if the current Hibernate L2 cached version of the cart is stale compared to the database version. This staleness
detection includes not only the cart, but all important, subordinate associations and collections.
This functionality is primarily useful in conjunction with stateless clusters (i.e. no session affinity), or with node
failover when session affinity is in play. It would allow a customer to retain appropriate order state, for example, in
the following use case:
Modifier and Type | Method and Description |
---|---|
org.broadleafcommerce.core.order.domain.Order |
findStaleCacheAwareCartForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)
Find the current IN_PROCESS cart for the customer.
|
org.broadleafcommerce.core.order.domain.Order |
findStaleCacheAwareCartForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer,
org.broadleafcommerce.core.order.domain.Order candidateCart)
Confirm the candidate cart is not stale in comparison to the current DB state.
|
CartInfo |
readCartInfoForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)
Retrieve information about the customer's current cart that is relevant for making a staleness determination.
|
org.broadleafcommerce.core.order.domain.Order findStaleCacheAwareCartForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)
customer
- the user for whom the cart is retrievedorg.broadleafcommerce.core.order.domain.Order findStaleCacheAwareCartForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer, org.broadleafcommerce.core.order.domain.Order candidateCart)
customer
- the user to whom the candidate cart belongscandidateCart
- the cart instance that was already retrieved and for which verification should be performedCartInfo readCartInfoForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)
customer
- the user for whom the cart info is retrievedCopyright © 2019. All rights reserved.