Package org.openwms.wms.location.impl
Class LocationServiceImpl
java.lang.Object
org.openwms.wms.location.impl.LocationServiceImpl
- All Implemented Interfaces:
LocationService
A LocationServiceImpl is a Spring managed transaction service that cares about Location management.
- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate final LocationRepositoryprivate final org.ameba.i18n.Translator -
Constructor Summary
ConstructorsConstructorDescriptionLocationServiceImpl(org.ameba.i18n.Translator translator, LocationRepository repository) -
Method Summary
Modifier and TypeMethodDescription@NotNull LocationfindByBK(@NotNull LocationPK locationId) Find and return the Location identified by the business key.@NotNull LocationfindByErpCode(@NotBlank String erpCode) Find and return the Location identified by the unique erpCode.@NotNull LocationfindByForeignPKey(@NotBlank String foreignPKey) Find and return a Location identified by the persistent key.private LocationfindByForeignPKeyInternal(String foreignPKey) findOptionalByErpCode(@NotBlank String erpCode) Find and return the Location identified by the unique erpCode.findOptionalByID(@NotNull LocationPK locationId) Find and return the Location identified by the business key.booleanisRemovalAllowed(@NotNull List<String> foreignPKeys) Requests the removal ofLocations identified by the foreign persistent keys.voidmarkForRemoval(@NotNull List<String> foreignPKeys) MarkLocations identified by the given keys for removal.@NotNull LocationSave aLocation.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
translator
private final org.ameba.i18n.Translator translator -
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:
findByForeignPKeyin interfaceLocationService- Parameters:
foreignPKey- The foreign persistent key of the Location instance- Returns:
- The instance
-
findByForeignPKeyInternal
-
findOptionalByID
Find and return the Location identified by the business key.- Specified by:
findOptionalByIDin interfaceLocationService- Parameters:
locationId- The coordinate of the Location- Returns:
- The instance
-
findByBK
Find and return the Location identified by the business key.- Specified by:
findByBKin interfaceLocationService- Parameters:
locationId- The coordinate of the Location- Returns:
- The instance
-
findByErpCode
Find and return the Location identified by the unique erpCode.- Specified by:
findByErpCodein interfaceLocationService- Parameters:
erpCode- The unique ERP code- Returns:
- The instance
-
findOptionalByErpCode
Find and return the Location identified by the unique erpCode.- Specified by:
findOptionalByErpCodein interfaceLocationService- Parameters:
erpCode- The unique ERP code- Returns:
- The instance
-
save
Save aLocation.- Specified by:
savein interfaceLocationService- Parameters:
location- The instance to save- Returns:
- The saved instance
-
isRemovalAllowed
Requests the removal ofLocations identified by the foreign persistent keys.- Specified by:
isRemovalAllowedin interfaceLocationService- Parameters:
foreignPKeys- The foreign persistent keys of theLocations to be deleted- Returns:
- true if deletion of
Locations is allowed
-
markForRemoval
MarkLocations identified by the given keys for removal.- Specified by:
markForRemovalin interfaceLocationService- Parameters:
foreignPKeys- The foreign persistent keys of theLocations to be removed
-