Class LocationTypeServiceImpl

java.lang.Object
org.openwms.common.location.impl.LocationTypeServiceImpl
All Implemented Interfaces:
LocationTypeService

@Validated @TxService class LocationTypeServiceImpl extends Object implements LocationTypeService
A LocationTypeServiceImpl is a Spring managed transactional Service that operates on LocationType entities and spans the tx boundary.
Author:
Heiko Scherrer
  • Field Details

    • translator

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

      private final LocationTypeRepository repository
  • Constructor Details

    • LocationTypeServiceImpl

      LocationTypeServiceImpl(org.ameba.i18n.Translator translator, LocationTypeRepository repository)
  • Method Details

    • findByPKey

      @Measured @NotNull public @NotNull LocationType findByPKey(@NotBlank @NotBlank String pKey)
      Find and return a LocationType.
      Specified by:
      findByPKey in interface LocationTypeService
      Parameters:
      pKey - The persistent key
      Returns:
      The instance
    • findInternal

      private LocationType findInternal(String pKey)
    • findByTypeName

      @Measured public Optional<LocationType> findByTypeName(@NotBlank @NotBlank String typeName)
      Find a LocationType by it's name.
      Specified by:
      findByTypeName in interface LocationTypeService
      Parameters:
      typeName - The name of the LocationType
      Returns:
      The instance
    • findAll

      @Measured @Transactional(readOnly=true) @NotNull public @NotNull List<LocationType> findAll()
      Return a list of all LocationTypes in natural order.
      Specified by:
      findAll in interface LocationTypeService
      Returns:
      All LocationTypes as a list
    • delete

      @Measured public void delete(@NotNull @NotNull List<LocationType> locationTypes)
      Delete already persisted LocationTypes. The implementation uses the PK to find the LocationType to be removed and removes it.
      Specified by:
      delete in interface LocationTypeService
      Parameters:
      locationTypes - A list of all instances to be deleted.
    • save

      @Measured @NotNull public @NotNull LocationType save(@NotNull @NotNull LocationType locationType)
      Save a LocationType.
      Specified by:
      save in interface LocationTypeService
      Parameters:
      locationType - The type to save
      Returns:
      The saved type