Interface OrderDao
- All Known Implementing Classes:
OrderDaoImpl
public interface OrderDao
-
Method Summary
Modifier and TypeMethodDescriptionbooleanacquireLock(Order order) This method will attempt to update theOrderLockobject table for the given order to mark it as locked, provided the OrderLock record for the given order was not already locked.create()createNewCartForCustomer(Customer customer) voidreadBatchOrders(int start, int pageSize, List<OrderStatus> statuses) Reads a batch list of orders from the DB.readBatchOrdersFromLastID(Long lastID, int pageSize, List<OrderStatus> statuses) Reads a batch list of orders from the DB starting at the ID passed in.readCartForCustomer(Customer customer) readNamedOrderForCustomer(Customer customer, String name) readOrderByExternalId(String orderExternalId) readOrderById(Long orderId) readOrderById(Long orderId, boolean refresh) readOrderByIdIgnoreCache(Long orderId) readOrderByOrderNumber(String orderNumber) readOrdersByDateRange(Date startDate, Date endDate) readOrdersByEmail(String email) readOrdersByIds(List<Long> orderIds) readOrdersForCustomer(Customer customer, OrderStatus orderStatus) readOrdersForCustomersInDateRange(List<Long> customerIds, Date startDate, Date endDate) readOrdersOlderThanDaysCount(Integer daysCount, Integer batchSize) voidbooleanreleaseLock(Order order) Releases the lock for the given order.submitOrder(Order cartOrder) updatePrices(Order order)
-
Method Details
-
readOrderById
-
readOrderByIdIgnoreCache
-
readOrdersByIds
-
readBatchOrders
Reads a batch list of orders from the DB. The status is optional and can be null. If no status is provided, then all order will be read. Otherwise, only orders with that status will be read.- Parameters:
start-pageSize-statuses-- Returns:
-
readBatchOrdersFromLastID
Reads a batch list of orders from the DB starting at the ID passed in. The lookup sorts by ID so the proper starting point will be used. The status is optional and can be null. If no status is provided, then all order will be read. Otherwise, only orders with that status will be read.- Parameters:
lastID-pageSize-statuses-- Returns:
-
readOrderById
-
readOrderByExternalId
-
readOrdersForCustomer
-
readOrdersForCustomer
-
readNamedOrderForCustomer
-
readCartForCustomer
-
save
-
delete
-
submitOrder
-
create
Order create() -
refresh
-
createNewCartForCustomer
-
readOrderByOrderNumber
-
readOrdersByDateRange
-
readOrdersOlderThanDaysCount
-
readOrdersForCustomersInDateRange
-
updatePrices
-
acquireLock
This method will attempt to update theOrderLockobject table for the given order to mark it as locked, provided the OrderLock record for the given order was not already locked. It will return true or false depending on whether or not the lock was able to be acquired.- Parameters:
order-- Returns:
- true if the lock was acquired, false otherwise
-
releaseLock
Releases the lock for the given order. Note that this method will release the lock for the order whether or not the caller was the current owner of the lock. As such, callers of this method should take care to ensure they hold the lock before attempting to release it.- Parameters:
order-- Returns:
- true if the lock was successfully released, false otherwise
-
readOrdersByEmail
-
readNumberOfOrders
Long readNumberOfOrders()
-