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.Logger
private final LocationRepository
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorsConstructorDescriptionLocationServiceImpl
(org.ameba.i18n.Translator translator, LocationRepository repository) -
Method Summary
Modifier and TypeMethodDescription@NotNull Location
findByBK
(@NotNull LocationPK locationId) Find and return the Location identified by the business key.@NotNull Location
findByErpCode
(@NotBlank String erpCode) Find and return the Location identified by the unique erpCode.@NotNull Location
findByForeignPKey
(@NotBlank String foreignPKey) Find and return a Location identified by the persistent key.private Location
findByForeignPKeyInternal
(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.boolean
isRemovalAllowed
(@NotNull List<String> foreignPKeys) Requests the removal ofLocation
s identified by the foreign persistent keys.void
markForRemoval
(@NotNull List<String> foreignPKeys) MarkLocation
s identified by the given keys for removal.@NotNull Location
Save 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:
findByForeignPKey
in 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:
findOptionalByID
in interfaceLocationService
- Parameters:
locationId
- The coordinate of the Location- Returns:
- The instance
-
findByBK
Find and return the Location identified by the business key.- Specified by:
findByBK
in interfaceLocationService
- Parameters:
locationId
- The coordinate of the Location- Returns:
- The instance
-
findByErpCode
Find and return the Location identified by the unique erpCode.- Specified by:
findByErpCode
in interfaceLocationService
- Parameters:
erpCode
- The unique ERP code- Returns:
- The instance
-
findOptionalByErpCode
Find and return the Location identified by the unique erpCode.- Specified by:
findOptionalByErpCode
in interfaceLocationService
- Parameters:
erpCode
- The unique ERP code- Returns:
- The instance
-
save
Save aLocation
.- Specified by:
save
in interfaceLocationService
- Parameters:
location
- The instance to save- Returns:
- The saved instance
-
isRemovalAllowed
Requests the removal ofLocation
s identified by the foreign persistent keys.- Specified by:
isRemovalAllowed
in interfaceLocationService
- Parameters:
foreignPKeys
- The foreign persistent keys of theLocation
s to be deleted- Returns:
- true if deletion of
Location
s is allowed
-
markForRemoval
MarkLocation
s identified by the given keys for removal.- Specified by:
markForRemoval
in interfaceLocationService
- Parameters:
foreignPKeys
- The foreign persistent keys of theLocation
s to be removed
-