Class LocationServiceImpl

java.lang.Object
org.openwms.wms.location.impl.LocationServiceImpl
All Implemented Interfaces:
LocationService

@Validated @TxService class LocationServiceImpl extends Object implements LocationService
A LocationServiceImpl is a Spring managed transaction service that cares about Location management.
Author:
Heiko Scherrer
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • translator

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

      private final LocationRepository repository
  • Constructor Details

    • LocationServiceImpl

      LocationServiceImpl(org.ameba.i18n.Translator translator, LocationRepository repository)
  • Method Details

    • findByForeignPKey

      @Measured @NotNull public @NotNull Location findByForeignPKey(@NotBlank @NotBlank String foreignPKey)
      Find and return a Location identified by the persistent key.
      Specified by:
      findByForeignPKey in interface LocationService
      Parameters:
      foreignPKey - The foreign persistent key of the Location instance
      Returns:
      The instance
    • findByForeignPKeyInternal

      private Location findByForeignPKeyInternal(String foreignPKey)
    • findOptionalByID

      @Measured public Optional<Location> findOptionalByID(@NotNull @NotNull LocationPK locationId)
      Find and return the Location identified by the business key.
      Specified by:
      findOptionalByID in interface LocationService
      Parameters:
      locationId - The coordinate of the Location
      Returns:
      The instance
    • findByBK

      @Measured @NotNull public @NotNull Location findByBK(@NotNull @NotNull LocationPK locationId)
      Find and return the Location identified by the business key.
      Specified by:
      findByBK in interface LocationService
      Parameters:
      locationId - The coordinate of the Location
      Returns:
      The instance
    • findByErpCode

      @Measured @NotNull public @NotNull Location findByErpCode(@NotBlank @NotBlank String erpCode)
      Find and return the Location identified by the unique erpCode.
      Specified by:
      findByErpCode in interface LocationService
      Parameters:
      erpCode - The unique ERP code
      Returns:
      The instance
    • findOptionalByErpCode

      @Measured public Optional<Location> findOptionalByErpCode(@NotBlank @NotBlank String erpCode)
      Find and return the Location identified by the unique erpCode.
      Specified by:
      findOptionalByErpCode in interface LocationService
      Parameters:
      erpCode - The unique ERP code
      Returns:
      The instance
    • save

      @Measured @NotNull public @NotNull Location save(@NotNull @NotNull Location location)
      Save a Location.
      Specified by:
      save in interface LocationService
      Parameters:
      location - The instance to save
      Returns:
      The saved instance
    • isRemovalAllowed

      @Measured public boolean isRemovalAllowed(@NotNull @NotNull List<String> foreignPKeys)
      Requests the removal of Locations identified by the foreign persistent keys.
      Specified by:
      isRemovalAllowed in interface LocationService
      Parameters:
      foreignPKeys - The foreign persistent keys of the Locations to be deleted
      Returns:
      true if deletion of Locations is allowed
    • markForRemoval

      @Measured public void markForRemoval(@NotNull @NotNull List<String> foreignPKeys)
      Mark Locations identified by the given keys for removal.
      Specified by:
      markForRemoval in interface LocationService
      Parameters:
      foreignPKeys - The foreign persistent keys of the Locations to be removed