Java Reference
In-Depth Information
made by the user. At the start of the process, it creates a PendingOrder from the
Order and stores it in the database. When the user saves his changes, the Modify-
OrderService updates the Order with the changes. Figure 13.6 shows the design,
<<interface>>
ModifyOrderService
getOrderToModify()
saveChangesToOrder()
cancelModifyOrder()
updateQuantities()
...
ModifyOrderServiceImpl
ModifyOrderResult getOrderToModify(orderId)
ModifyOrderResult saveChangesToOrder(orderId, pendingOrderId)
ModifyOrderResult cancelModifyOrder(orderId, pendingOrderId)
ModifyOrderResult updateQuantities(orderId, pendingOrderId,
quantities)
...
ModifyOrder
Result
status
<<interface>>
OrderRepository
PendingOrder
find()
updateQuantities(... )
updateDeliveryInfo(... )
...
Order
modify()
<<interface>>
LockManager
<<interface>>
Pending
OrderRepository
acquireLock()
verifyLock()
releaseLock()
createPendingOrder()
deletePendingOrder()
Figure 13.6
LockManager -based domain model
Search WWH ::




Custom Search