Package org.openwms.wms.inventory
Class LoadUnit
java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.ameba.integration.jpa.ApplicationEntity
org.openwms.wms.inventory.LoadUnit
- All Implemented Interfaces:
Serializable,org.ameba.integration.TypedEntity<Long>
@Entity
public class LoadUnit
extends org.ameba.integration.jpa.ApplicationEntity
implements Serializable
A LoadUnit is used to divide a
TransportUnit into multiple physical areas. It always requires a TransportUnit to be moved
around, but it may contain PackagingUnits of arbitrary Product types or it may dedicated to one particular Product
type only.- Author:
- Heiko Scherrer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DimensionThe current dimension of theLoadUnit.private StringAn identifying label of theLoadUnit.private booleanLocked for allocation.private static final org.slf4j.Loggerprivate booleanWhether it is allowed to store differentProductsin this LoadUnit.private List<PackagingUnit> AllPackagingUnits that belong to thisLoadUnit.private @NotEmpty StringWhere thisLoadUnitis located on theTransportUnit.private ProductThe Product that is carried within the LoadUnit.private @NotNull TransportUnitTheTransportUnitwhere thisLoadUnitbelongs to.private @NotNull LoadUnitTypeTheLoadUnitTypetheLoadUnitis of.Fields inherited from class org.ameba.integration.jpa.ApplicationEntity
C_ID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLoadUnit()Dear JPA ...LoadUnit(TransportUnit transportUnit, String physicalPosition, LoadUnitType type) Create a new LoadUnit. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPackagingUnit(PackagingUnit packagingUnit) Add onePackagingUnitto this LoadUnit.voidAssign a Product to this LoadUnit.booleangetLabel()Get the packagingUnits.Get the physicalPosition.Get the product.Get the transportUnit.getType()inthashCode()booleanCheck whether thisLoadUnithasPackagingUnits.private List<PackagingUnit> booleanisLocked()Get the locked.booleanvoidremovePackagingUnits(PackagingUnit... pUnits) Remove one or morePackagingUnits from this LoadUnit.voidsetLocked(boolean locked) Set the locked.voidsetMixedProducts(boolean mixedProducts) toString()voidUnassign the product from this LoadUnit - set it to null.Methods inherited from class org.ameba.integration.jpa.ApplicationEntity
getPersistentKey, hasPersistentKey, onEntityPersist, onPersist, setPersistentKeyMethods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setCreatedBy, setCreateDt, setLastModifiedBy, setLastModifiedDt, setOl
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
transportUnit
TheTransportUnitwhere thisLoadUnitbelongs to. -
physicalPosition
Where thisLoadUnitis located on theTransportUnit. -
label
An identifying label of theLoadUnit. -
type
TheLoadUnitTypetheLoadUnitis of. -
locked
private boolean lockedLocked for allocation. -
mixedProducts
private boolean mixedProductsWhether it is allowed to store differentProductsin this LoadUnit. -
product
The Product that is carried within the LoadUnit. -
dimension
The current dimension of theLoadUnit. -
packagingUnits
AllPackagingUnits that belong to thisLoadUnit.
-
-
Constructor Details
-
LoadUnit
protected LoadUnit()Dear JPA ... -
LoadUnit
Create a new LoadUnit.- Parameters:
transportUnit- TheTransportUnitwhere this LoadUnit stands on.physicalPosition- The physical position within theTransportUnitwhere this LoadUnit stands ontype- The LoadUnitType to assign the LoadUnit to
-
-
Method Details
-
getTransportUnit
Get the transportUnit.- Returns:
- the transportUnit.
-
getPhysicalPosition
Get the physicalPosition.- Returns:
- the physicalPosition.
-
getLabel
-
isLocked
public boolean isLocked()Get the locked.- Returns:
- the locked.
-
setLocked
public void setLocked(boolean locked) Set the locked.- Parameters:
locked- The locked to set.
-
isMixedProducts
public boolean isMixedProducts() -
setMixedProducts
public void setMixedProducts(boolean mixedProducts) -
getProduct
Get the product.- Returns:
- the product.
-
assignProduct
Assign a Product to this LoadUnit.- Parameters:
p- The product to assign.
-
unassignProduct
public void unassignProduct()Unassign the product from this LoadUnit - set it to null. -
getType
-
getDimension
-
getPackagingUnits
Get the packagingUnits.- Returns:
- the packagingUnits.
-
hasPackagingUnits
public boolean hasPackagingUnits()Check whether thisLoadUnithasPackagingUnits.- Returns:
- true if so
-
initializeAndGet
-
addPackagingUnit
Add onePackagingUnitto this LoadUnit.- Parameters:
packagingUnit-PackagingUnitto add
-
removePackagingUnits
Remove one or morePackagingUnits from this LoadUnit.- Parameters:
pUnits-PackagingUnits to remove
-
toString
Return a combination of the barcode and the physicalPosition. -
equals
Use the TransportUnit and the Position only- Overrides:
equalsin classorg.ameba.integration.jpa.ApplicationEntity
-
hashCode
public int hashCode()Use the TransportUnit and the Position only- Overrides:
hashCodein classorg.ameba.integration.jpa.ApplicationEntity
-