Interface TransportationService<T extends TransportOrder>

Type Parameters:
T - Any kind of TransportOrder
All Known Implementing Classes:

public interface TransportationService<T extends TransportOrder>
A TransportationService offers some useful methods regarding the general handling of TransportOrders.
Heiko Scherrer
  • Method Details

    • findBy

      List<T> findBy(String barcode, String... states)
      FInd all TransportOrders for a TransportUnit in the given states.
      barcode - The Barcode of the TransportUnit
      states - A set of TransportOrder states
      A List of all TransportOrders, never null
    • findByPKey

      T findByPKey(String pKey)
      Find and return the TransportOrder identified by the persisted key pKey.
      pKey - The persisted key
      An TransportOrder instance
      org.ameba.exception.NotFoundException - if no entity was found
    • getNoTransportOrdersToTarget

      int getNoTransportOrdersToTarget(String target, String... states)
      Returns the number of TransportOrders that have the target as target and are in one of the states.
      target - The target place to search TransportOrders for
      states - An array of TransportOrder states to filter TransportOrders for
      Number of all TransportOrders in one of the states that are on the way to the target
    • create

      T create(String barcode, String target, String priority)
      Create a new TransportOrder with the given target.
      barcode - The ID of the TransportUnit to move
      target - The target of the TransportOrder to move to
      priority - A PriorityLevel of the new TransportOrder
      The newly created TransportOrder
    • update

      T update(T transportOrder)
      Modifies an existing TransportOrder according to the argument passed as TransportOrder.
      transportOrder - Stores the ID of the TransportOrder to change as well as the state to change
      The modified instance
    • change

      Try to turn a list of TransportOrders into the given state.
      state - The state to change all orders to
      pKeys - The persisted keys of TransportOrders
      A list of persisted keys of TransportOrders that have not been changed
    • change

      Collection<Message> change(String barcode, TransportOrderState currentState, TransportOrderState targetState, Message message)
      Request a state change for all TransportOrders for the TransportUnit with the given barcode.
      barcode - The ID of the TransportUnit to move
      currentState - The state of TransportOrders to change
      targetState - The state to change all orders to
      message - A messages attached to the changed TransportOrder, may be null
      A list of Messages according to the TransportOrders that have not been changed