Package org.openwms.wms.inventory.impl
Class LoadUnitServiceImpl
java.lang.Object
org.openwms.wms.inventory.impl.LoadUnitServiceImpl
- All Implemented Interfaces:
LoadUnitService
A LoadUnitServiceImpl.
- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationEventPublisherprivate final LoadUnitTypeServiceprivate static final org.slf4j.Loggerprivate final PackagingUnitRepositoryprivate final ProductServiceprivate final LoadUnitRepositoryprivate final TransportUnitServiceprivate final org.ameba.i18n.Translator -
Constructor Summary
ConstructorsConstructorDescriptionLoadUnitServiceImpl(org.ameba.i18n.Translator translator, LoadUnitRepository repository, PackagingUnitRepository packagingUnitRepository, LoadUnitTypeService loadUnitTypeRepository, ProductService productService, TransportUnitService service, org.springframework.context.ApplicationEventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionprivate LoadUnitcreateInternal(TransportUnit tu, LoadUnitType type, String position) voidDivide aTransportUnitidentified by its business key into a number of parts.Find and return allLoadUnits on aTransportUnit.findByPKey(@NotBlank String pKey) Find and return aLoadUnit.private LoadUnitfindInternal(String pKey) findInternal(String transportUnitBK, String loadUnitPosition) findOptional(@NotBlank String transportUnitBK, @NotBlank String loadUnitPosition) findOrThrow(@NotNull Long pk) Find and return aLoadUnit.private TransportUnitfindTransportUnit(String transportUnitBK) private LoadUnitTypegetLoadUnitType(String loadUnitType) booleanisLoadUnitEmpty(@NotBlank String transportUnitBK, @NotBlank String loadUnitPosition) Checks whether theLoadUnitis empty.voidLoad aLoadUnitwith the givenProduct.Save an already existing and modified instance of aLoadUnit.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
translator
private final org.ameba.i18n.Translator translator -
repository
-
packagingUnitRepository
-
loadUnitTypeService
-
productService
-
service
-
eventPublisher
private final org.springframework.context.ApplicationEventPublisher eventPublisher
-
-
Constructor Details
-
LoadUnitServiceImpl
LoadUnitServiceImpl(org.ameba.i18n.Translator translator, LoadUnitRepository repository, PackagingUnitRepository packagingUnitRepository, LoadUnitTypeService loadUnitTypeRepository, ProductService productService, TransportUnitService service, org.springframework.context.ApplicationEventPublisher eventPublisher)
-
-
Method Details
-
create
@Measured public LoadUnit create(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String position, @NotBlank @NotBlank String loadUnitType) - Specified by:
createin interfaceLoadUnitService- Parameters:
transportUnitBK- The TransportUnit's business keyposition- The position on the TransportUnitloadUnitType- The LoadUnitType to assign the LoadUnit to- Returns:
- The newly created instance
-
findTransportUnit
-
divide
@Measured public void divide(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String loadUnitType, int parts) Divide aTransportUnitidentified by its business key into a number of parts.- Specified by:
dividein interfaceLoadUnitService- Parameters:
transportUnitBK- The business key of the TransportUnit to divideloadUnitType- The type of that the LoadUnits are createdparts- The number of parts
-
createInternal
-
getLoadUnitType
-
load
@Measured public void load(@NotBlank @NotBlank String pKey, @NotNull @Valid @NotNull @Valid ProductVO product) Load aLoadUnitwith the givenProduct.- Specified by:
loadin interfaceLoadUnitService- Parameters:
pKey- The synthetic persistent key of the LoadUnitproduct- The Product to load
-
findInternal
-
find
Find and return allLoadUnits on aTransportUnit.- Specified by:
findin interfaceLoadUnitService- Parameters:
transportUnitBK- The business key of the TransportUnit- Returns:
- The LoadUnit instance
-
findOptional
@Measured public Optional<LoadUnit> findOptional(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String loadUnitPosition) - Specified by:
findOptionalin interfaceLoadUnitService- Parameters:
transportUnitBK- The business key of the TransportUnitloadUnitPosition- The position of the LoadUnit on top of the TransportUnit- Returns:
- The LoadUnit instance
-
findInternal
-
find
@Measured public LoadUnit find(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String loadUnitPosition) - Specified by:
findin interfaceLoadUnitService- 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.- Specified by:
savein interfaceLoadUnitService- Parameters:
loadUnit- The modified LoadUnit to save- Returns:
- The saved instance
-
findByPKey
Find and return aLoadUnit.- Specified by:
findByPKeyin interfaceLoadUnitService- Parameters:
pKey- The persistent key- Returns:
- The instance
-
findOrThrow
Find and return aLoadUnit.- Specified by:
findOrThrowin interfaceLoadUnitService- Parameters:
pk- The primary key- Returns:
- The instance
-
isLoadUnitEmpty
@Measured public boolean isLoadUnitEmpty(@NotBlank @NotBlank String transportUnitBK, @NotBlank @NotBlank String loadUnitPosition) Checks whether theLoadUnitis empty.- Specified by:
isLoadUnitEmptyin interfaceLoadUnitService- Parameters:
transportUnitBK- The identifying business key of the TransportUnit the LoadUnit is placed onloadUnitPosition- The identifying position within that TransportUnit- Returns:
- true if empty
-