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 Dimension
The current dimension of theLoadUnit
.private String
An identifying label of theLoadUnit
.private boolean
Locked for allocation.private static final org.slf4j.Logger
private boolean
Whether it is allowed to store differentProducts
in this LoadUnit.private boolean
private List<PackagingUnit>
AllPackagingUnit
s that belong to thisLoadUnit
.private @NotEmpty String
Where thisLoadUnit
is located on theTransportUnit
.private Product
The Product that is carried within the LoadUnit.private @NotNull TransportUnit
TheTransportUnit
where thisLoadUnit
belongs to.private @NotNull LoadUnitType
TheLoadUnitType
theLoadUnit
is of.Fields inherited from class org.ameba.integration.jpa.ApplicationEntity
C_ID
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
LoadUnit()
Dear JPA ...LoadUnit
(TransportUnit transportUnit, String physicalPosition, LoadUnitType type) Create a new LoadUnit. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPackagingUnit
(PackagingUnit packagingUnit) Add onePackagingUnit
to this LoadUnit.void
Assign a Product to this LoadUnit.boolean
getLabel()
Get the packagingUnits.Get the physicalPosition.Get the product.Get the transportUnit.getType()
int
hashCode()
boolean
Check whether thisLoadUnit
hasPackagingUnit
s.private List<PackagingUnit>
boolean
isLocked()
Get the locked.boolean
boolean
void
removePackagingUnits
(PackagingUnit... pUnits) Remove one or morePackagingUnit
s from this LoadUnit.void
setLocked
(boolean locked) Set the locked.void
setMixedProducts
(boolean mixedProducts) toString()
void
Unassign the product from this LoadUnit - set it to null.Methods inherited from class org.ameba.integration.jpa.ApplicationEntity
getPersistentKey, hasPersistentKey, onEntityPersist, onPersist, setPersistentKey
Methods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setOl
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
transportUnit
TheTransportUnit
where thisLoadUnit
belongs to. -
physicalPosition
Where thisLoadUnit
is located on theTransportUnit
. -
label
An identifying label of theLoadUnit
. -
type
TheLoadUnitType
theLoadUnit
is of. -
locked
private boolean lockedLocked for allocation. -
mixedProductsDefault
@Autowired @Value("${owms.wms.inventory.mixedProductsInLuAllowed:true}") private boolean mixedProductsDefault -
mixedProducts
private boolean mixedProductsWhether it is allowed to store differentProducts
in this LoadUnit. -
product
The Product that is carried within the LoadUnit. -
dimension
The current dimension of theLoadUnit
. -
packagingUnits
AllPackagingUnit
s that belong to thisLoadUnit
.
-
-
Constructor Details
-
LoadUnit
protected LoadUnit()Dear JPA ... -
LoadUnit
Create a new LoadUnit.- Parameters:
transportUnit
- TheTransportUnit
where this LoadUnit stands on.physicalPosition
- The physical position within theTransportUnit
where 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
-
isMixedProductsDefault
public boolean isMixedProductsDefault() -
getDimension
-
getPackagingUnits
Get the packagingUnits.- Returns:
- the packagingUnits.
-
hasPackagingUnits
public boolean hasPackagingUnits()Check whether thisLoadUnit
hasPackagingUnit
s.- Returns:
- true if so
-
initializeAndGet
-
addPackagingUnit
Add onePackagingUnit
to this LoadUnit.- Parameters:
packagingUnit
-PackagingUnit
to add
-
removePackagingUnits
Remove one or morePackagingUnit
s from this LoadUnit.- Parameters:
pUnits
-PackagingUnit
s to remove
-
toString
Return a combination of the barcode and the physicalPosition. -
equals
Use the TransportUnit and the Position only- Overrides:
equals
in classorg.ameba.integration.jpa.ApplicationEntity
-
hashCode
public int hashCode()Use the TransportUnit and the Position only- Overrides:
hashCode
in classorg.ameba.integration.jpa.ApplicationEntity
-