Class ChangeTU

java.lang.Object
org.openwms.tms.impl.ChangeTU
All Implemented Interfaces:
UpdateFunction

@TxService(propagation=MANDATORY) class ChangeTU extends Object implements UpdateFunction
A ChangeTU is responsible to change a TransportOrders assigned TransportUnit.
Author:
Heiko Scherrer
  • Field Details

    • transportUnitApi

      private final org.openwms.common.transport.api.TransportUnitApi transportUnitApi
    • validator

      private final jakarta.validation.Validator validator
  • Constructor Details

    • ChangeTU

      ChangeTU(jakarta.validation.Validator validator, org.openwms.common.transport.api.TransportUnitApi transportUnitApi)
  • Method Details

    • update

      @Measured public void update(TransportOrder saved, TransportOrder toUpdate)
      Validate and change the requested values of the saved instance. If the assigned TransportUnitBK has changed, we're going to re-assign the {code TransportUnit}s.
      Specified by:
      update in interface UpdateFunction
      Parameters:
      saved - The currently persisted TransportOrder
      toUpdate - The TransportOrder holding the new values to save
    • validateAttributes

      private void validateAttributes(TransportOrder to)