Package org.openwms.tms
Interface TransportationService<T extends TransportOrder>
- Type Parameters:
T
- Any kind ofTransportOrder
- All Known Implementing Classes:
TransportationServiceImpl
public interface TransportationService<T extends TransportOrder>
A TransportationService offers some useful methods regarding the general handling of
TransportOrder
s.- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionchange
(String barcode, TransportOrderState currentState, TransportOrderState targetState, Message message) change
(TransportOrderState state, Collection<String> pKeys) Try to turn a list ofTransportOrder
s into the givenstate
.Create a newTransportOrder
with the giventarget
.findByPKey
(String pKey) Find and return theTransportOrder
identified by the persisted keypKey
.int
getNoTransportOrdersToTarget
(String target, String... states) Modifies an existingTransportOrder
according to the argument passed asTransportOrder
.
-
Method Details
-
findBy
- Parameters:
barcode
- The Barcode of the TransportUnitstates
- A set of TransportOrder states- Returns:
- A List of all TransportOrders, never null
-
findByPKey
Find and return theTransportOrder
identified by the persisted keypKey
.- Parameters:
pKey
- The persisted key- Returns:
- An
TransportOrder
instance - Throws:
org.ameba.exception.NotFoundException
- if no entity was found
-
getNoTransportOrdersToTarget
- Parameters:
target
- The target place to search TransportOrders forstates
- An array of TransportOrder states to filter TransportOrders for- Returns:
- Number of all TransportOrders in one of the
states
that are on the way to thetarget
-
create
Create a newTransportOrder
with the giventarget
.- Parameters:
barcode
- The ID of theTransportUnit
to movetarget
- The target of the TransportOrder to move topriority
- APriorityLevel
of the newTransportOrder
- Returns:
- The newly created
TransportOrder
-
update
Modifies an existingTransportOrder
according to the argument passed asTransportOrder
.- Parameters:
transportOrder
- Stores the ID of theTransportOrder
to change as well as the state to change- Returns:
- The modified instance
-
change
Try to turn a list ofTransportOrder
s into the givenstate
.- Parameters:
state
- The state to change all orders topKeys
- The persisted keys ofTransportOrder
s- Returns:
- A list of persisted keys of
TransportOrder
s that have not been changed
-
change
Collection<Message> change(String barcode, TransportOrderState currentState, TransportOrderState targetState, Message message) - Parameters:
barcode
- The ID of theTransportUnit
to movecurrentState
- The state of TransportOrders to changetargetState
- The state to change all orders tomessage
- A messages attached to the changed TransportOrder, may be null- Returns:
- A list of Messages according to the
TransportOrder
s that have not been changed
-