Package org.openwms.wms.inventory
Interface LoadUnitService
- All Known Implementing Classes:
LoadUnitServiceImpl
public interface LoadUnitService
A LoadUnitService.
- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Divide aTransportUnit
identified by its business key into a number of parts.Find and return allLoadUnit
s on aTransportUnit
.findByPKey
(@NotBlank String pKey) Find and return aLoadUnit
.findOptional
(@NotBlank String transportUnitBK, @NotBlank String loadUnitPosition) findOrThrow
(@NotNull Long pk) Find and return aLoadUnit
.boolean
isLoadUnitEmpty
(@NotBlank String transportUnitBK, @NotBlank String loadUnitPosition) Checks whether theLoadUnit
is empty.void
Load aLoadUnit
with the givenProduct
.Save an already existing and modified instance of aLoadUnit
.
-
Method Details
-
create
LoadUnit create(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String position, @NotBlank @NotBlank String loadUnitType) - Parameters:
transportUnitBK
- The TransportUnit's business keyposition
- The position on the TransportUnitloadUnitType
- The LoadUnitType to assign the LoadUnit to- Returns:
- The newly created instance
-
divide
void divide(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String loadUnitType, int parts) Divide aTransportUnit
identified by its business key into a number of parts.- Parameters:
transportUnitBK
- The business key of the TransportUnit to divideloadUnitType
- The type of that the LoadUnits are createdparts
- The number of parts
-
load
Load aLoadUnit
with the givenProduct
.- Parameters:
pKey
- The synthetic persistent key of the LoadUnitproduct
- The Product to load
-
find
Find and return allLoadUnit
s on aTransportUnit
.- Parameters:
transportUnitBK
- The business key of the TransportUnit- Returns:
- The LoadUnit instance
-
findOptional
Optional<LoadUnit> findOptional(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String loadUnitPosition) - Parameters:
transportUnitBK
- The business key of the TransportUnitloadUnitPosition
- The position of the LoadUnit on top of the TransportUnit- Returns:
- The LoadUnit instance
-
find
LoadUnit find(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String loadUnitPosition) - Parameters:
transportUnitBK
- The business key of the TransportUnitloadUnitPosition
- The position of the LoadUnit on top of the TransportUnit- Returns:
- The LoadUnit instance
-
save
Save an already existing and modified instance of aLoadUnit
.- Parameters:
loadUnit
- The modified LoadUnit to save- Returns:
- The saved instance
-
findByPKey
Find and return aLoadUnit
.- Parameters:
pKey
- The persistent key- Returns:
- The instance
- Throws:
org.ameba.exception.NotFoundException
- in case it does not exist
-
findOrThrow
Find and return aLoadUnit
.- Parameters:
pk
- The primary key- Returns:
- The instance
- Throws:
org.ameba.exception.NotFoundException
- in case it does not exist
-
isLoadUnitEmpty
boolean isLoadUnitEmpty(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String loadUnitPosition) Checks whether theLoadUnit
is empty.- Parameters:
transportUnitBK
- The identifying business key of the TransportUnit the LoadUnit is placed onloadUnitPosition
- The identifying position within that TransportUnit- Returns:
- true if empty
-