Class PackagingUnitFinderImpl

java.lang.Object
org.openwms.wms.inventory.impl.PackagingUnitFinderImpl
All Implemented Interfaces:
PackagingUnitFinder

@Validated @TxService class PackagingUnitFinderImpl extends Object implements PackagingUnitFinder
A PackagingUnitFinderImpl is a Spring managed transactional bean that is responsible for all query operations on PackagingUnits.
Author:
Heiko Scherrer
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • translator

      private final org.ameba.i18n.Translator translator
    • repository

      private final PackagingUnitRepository repository
    • productService

      private final ProductService productService
    • loadUnitService

      private final LoadUnitService loadUnitService
    • locationService

      private final LocationService locationService
    • transportUnitService

      private final TransportUnitService transportUnitService
    • locationGroupApi

      private final org.openwms.common.location.api.LocationGroupApi locationGroupApi
  • Constructor Details

  • Method Details

    • findByPKey

      @Measured public PackagingUnit findByPKey(@NotEmpty @NotEmpty String pKey)
      Find and return a PackagingUnit.
      Specified by:
      findByPKey in interface PackagingUnitFinder
      Parameters:
      pKey - The persistent identifier
      Returns:
      The instance
    • findByPKeyInternal

      private PackagingUnit findByPKeyInternal(String pKey)
    • findOnLocation

      @Measured @NotNull public @NotNull List<PackagingUnit> findOnLocation(@NotEmpty @NotEmpty String erpCode)
      Find and return all PackagingUnits that are located on a Location.
      Specified by:
      findOnLocation in interface PackagingUnitFinder
      Parameters:
      erpCode - The business key of the Location the PackagingUnits are placed on
      Returns:
      A list of all PackagingUnits, never null
    • findOnTU

      @Measured @NotNull public @NotNull List<PackagingUnit> findOnTU(@NotEmpty @NotEmpty String transportUnitBK)
      Find and return all PackagingUnits that are located on a TransportUnit.
      Specified by:
      findOnTU in interface PackagingUnitFinder
      Parameters:
      transportUnitBK - The business key of the TransportUnit the PackagingUnits are carried on
      Returns:
      A list of all PackagingUnits, never null
    • findOnTUandLU

      @Measured @NotNull public @NotNull List<PackagingUnit> findOnTUandLU(@NotEmpty @NotEmpty String transportUnitBK, @NotEmpty @NotEmpty String luPos)
      Find and return all PackagingUnits that are located on a TransportUnit within a particular LoadUnit.
      Specified by:
      findOnTUandLU in interface PackagingUnitFinder
      Parameters:
      transportUnitBK - The business key of the TransportUnit the PackagingUnits are carried on
      luPos - The position of the LoadUnit within the TransportUnit
      Returns:
      A list of all PackagingUnits, never null
    • findForSku

      @Measured @NotNull public @NotNull List<PackagingUnit> findForSku(@NotEmpty @NotEmpty String sku)
      Find and return all PackagingUnits for the given SKU.
      Specified by:
      findForSku in interface PackagingUnitFinder
      Parameters:
      sku - The Products SKU
      Returns:
      A list of PackagingUnits, never null
    • findForSku

      @Measured @NotNull public @NotNull List<PackagingUnit> findForSku(@NotEmpty @NotEmpty String sku, int amount, String sortDirection, String sortProperty)
      Find and return an amount of PackagingUnits for the given SKU.
      Specified by:
      findForSku in interface PackagingUnitFinder
      Parameters:
      sku - The Products SKU
      amount - The number of returned hits
      sortDirection - The sort direction either ASC or DESC or null
      sortProperty - The property to sort the result list or null
      Returns:
      A list of PackagingUnits, never null
    • findOfProductInLG

      @Measured @NotNull public @NotNull List<PackagingUnit> findOfProductInLG(@NotBlank @NotBlank String productPKey, List<String> locationGroupNames, String sortDirection, String sortProperty)
      Find and return all PackagingUnits of a Product identified by the given productPKey that is located within a particular LocationGroup identified by the given locationGroupName.
      Specified by:
      findOfProductInLG in interface PackagingUnitFinder
      Parameters:
      productPKey - The Product persistent key
      locationGroupNames - The identifying names of the LocationGroups
      sortDirection - Either ASC or DESC
      sortProperty - The name of the property to sort for
      Returns:
      A list of PackagingUnits
    • findAmountOfProductByPKey

      @Measured @NotNull public @NotNull org.openwms.core.units.api.Measurable findAmountOfProductByPKey(@NotBlank @NotBlank String productPKey, @NotBlank @NotBlank String locationGroupName)
      Find and return the quantity of all PackagingUnits.
      Specified by:
      findAmountOfProductByPKey in interface PackagingUnitFinder
      Parameters:
      productPKey - The Product's persistent key
      locationGroupName - The identifying name of the LocationGroup and children to search for
      Returns:
      The sum of quantities of all PackagingUnits
    • findAmountOfProductBySKU

      @Measured @NotNull public @NotNull org.openwms.core.units.api.Measurable findAmountOfProductBySKU(@NotBlank @NotBlank String sku, @NotBlank @NotBlank String locationGroupName)
      Find and return the quantity of all PackagingUnits.
      Specified by:
      findAmountOfProductBySKU in interface PackagingUnitFinder
      Parameters:
      sku - or the Product's SKU
      locationGroupName - The identifying name of the LocationGroup and children to search for
      Returns:
      The sum of quantities of all PackagingUnits
    • findAmountOfProductBySKUOnLocation

      @Measured @NotNull public @NotNull org.openwms.core.units.api.Measurable findAmountOfProductBySKUOnLocation(@NotBlank @NotBlank String sku, @NotBlank @NotBlank String locationErpCode)
      Find and return the quantity of all PackagingUnits.
      Specified by:
      findAmountOfProductBySKUOnLocation in interface PackagingUnitFinder
      Parameters:
      sku - or the Product's SKU
      locationErpCode - The identifying name of the Location to search for
      Returns:
      The sum of quantities of all PackagingUnits
    • findAvailablesForProductOnLocationsOnly

      @Measured @NotNull public @NotNull List<PackagingUnit> findAvailablesForProductOnLocationsOnly(@NotNull @NotNull Product product)
      Specified by:
      findAvailablesForProductOnLocationsOnly in interface PackagingUnitFinder
    • findAvailablesForProductInLoadUnitsOnly

      @Measured @NotNull public @NotNull List<PackagingUnit> findAvailablesForProductInLoadUnitsOnly(@NotNull @NotNull Product product)
      Specified by:
      findAvailablesForProductInLoadUnitsOnly in interface PackagingUnitFinder