Interface TransportUnitService

All Known Implementing Classes:
TransportUnitServiceImpl

public interface TransportUnitService
A TransportUnitService.
Author:
Heiko Scherrer
  • Method Details

    • findOneBy

      Optional<TransportUnit> findOneBy(@NotBlank @NotBlank String transportUnitBK)
      Find and return a TransportUnit.
      Parameters:
      transportUnitBK - The business key
      Returns:
      The instance
    • findOneByOrThrow

      TransportUnit findOneByOrThrow(@NotBlank @NotBlank String transportUnitBK)
      Find and return a TransportUnit.
      Parameters:
      transportUnitBK - The business key
      Returns:
      The instance
      Throws:
      org.ameba.exception.NotFoundException - in case no TransportUnit exists
    • findAllBy

      @NotNull @NotNull List<TransportUnit> findAllBy(@NotEmpty @NotEmpty List<String> transportUnitBKs)
      Find and return TransportUnits.
      Parameters:
      transportUnitBKs - The business keys of the TransportUnits to search for
      Returns:
      All instances, never null
    • findByPKey

      @NotNull @NotNull TransportUnit findByPKey(@NotBlank @NotBlank String pKey)
      Find and return a TransportUnit.
      Parameters:
      pKey - The persistent identifier
      Returns:
      The instance, never null
      Throws:
      org.ameba.exception.NotFoundException - in case no TransportUnit exists
    • findOnLocation

      @NotNull @NotNull List<TransportUnit> findOnLocation(@NotBlank @NotBlank String erpCode)
      Find and return all TransportUnits that are located on the Location identified by the given erpCode.
      Parameters:
      erpCode - The Location where the TransportUnits are placed on
      Returns:
      All TransportUnits or an empty List, never null
    • create

      @NotNull @NotNull TransportUnit create(@NotNull @NotNull TransportUnit transportUnit)
      Create a new TransportUnit.
      Parameters:
      transportUnit - The instance to create
      Returns:
      The created instance
      Throws:
      org.ameba.exception.ResourceExistsException - In case the TransportUnit already exists
    • moveTransportUnit

      @NotNull @NotNull TransportUnit moveTransportUnit(@NotNull @NotNull Barcode transportUnitBK, @NotBlank @NotBlank String targetLocationIdentifier)
      Move a TransportUnit to a new Location.
      Parameters:
      transportUnitBK - The business key of the TransportUnit to move
      targetLocationIdentifier - The ERP code or the LocationId of the Location to move to
      Returns:
      The moved instance
    • createWithoutBK

      @NotNull @NotNull CommonTransportUnitVO createWithoutBK(@NotBlank @NotBlank String tut, @NotBlank @NotBlank String actualErpCode, String loadUnitType, Integer parts, String customerOrderId)
      Create a TransportUnit with a transportUnitBK generated by the system and a number of LoadUnits.
      Parameters:
      tut - The name of the TransportUnitType to use
      actualErpCode - The actual ERP code
      loadUnitType - The name of the LoadUnitType (optional)
      parts - The number of LoadUnits to create (optional)
      customerOrderId - A reference to the customer order this TransportUnit is assigned to (optional)
      Returns:
      The created instance
    • createWithBK

      @NotNull @NotNull TransportUnit createWithBK(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String tut, @NotBlank @NotBlank String actualErpCode, String loadUnitType, Integer parts, String customerOrderId)
      Create a TransportUnit with the given transportUnitBK and a number of LoadUnits.
      Parameters:
      transportUnitBK - The business key to use
      tut - The name of the TransportUnitType to use
      actualErpCode - The actual ERP code
      loadUnitType - The name of the LoadUnitType (optional)
      parts - The number of LoadUnits to create (optional)
      customerOrderId - A reference to the customer order this TransportUnit is assigned to (optional)
      Returns:
      The created instance
    • save

      @NotNull @NotNull TransportUnit save(@NotNull @NotNull TransportUnit tu)
      Save an existing TransportUnit.
      Parameters:
      tu - The modified instance to save
      Returns:
      The saved instance