Package org.openwms.wms.shipping.impl
Class ShippingOrderPosition
java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.ameba.integration.jpa.ApplicationEntity
org.openwms.wms.shipping.impl.AbstractShippingOrderPosition<ShippingOrderPositionSplit>
org.openwms.wms.shipping.impl.ShippingOrderPosition
- All Implemented Interfaces:
Serializable
,org.ameba.integration.TypedEntity<Long>
@Entity
public class ShippingOrderPosition
extends AbstractShippingOrderPosition<ShippingOrderPositionSplit>
implements Serializable
A OrderPosition.
- Author:
- Heiko Scherrer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionArbitrary details of this Position.private Set
<ShippingOrderPositionSplit> All Splits created from this Position.private @NotNull(message="{owms.wms.shp.product}",groups=Create.class) Product
The orderedProduct
.private org.openwms.core.units.api.Measurable
<?, ?, ?> The quantity that has been allocated.private org.openwms.core.units.api.Measurable
<?, ?, ?> The quantity planned for cross-docking.private @NotNull(message="{owms.wms.shp.qtyDemanded}",groups=Create.class) org.openwms.core.units.api.Measurable
<?, ?, ?> The quantity that was originally demanded.Fields inherited from class org.ameba.integration.jpa.ApplicationEntity
C_ID
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Used by the JPA provider.ShippingOrderPosition
(@NotNull ShippingOrder order, @NotNull Integer positionNo, @NotNull org.openwms.core.units.api.Measurable<?, ?, ?> qtyDemanded, @NotNull Product product) Create a new ShippingOrderPosition with the mandatory attributes. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSplits
(List<ShippingOrderPositionSplit> splits) Add one or more Splits to this Position.boolean
No splits.Get the arbitrary details of the Position.Get all created OrderPositionSplits that belong to this Position.org.openwms.core.units.api.Measurable
org.openwms.core.units.api.Measurable
org.openwms.core.units.api.Measurable
int
hashCode()
No splits.boolean
Check if the demanded quantity of this Position is fulfilled by the sum of all Splits.void
setDetails
(Map<String, String> details) Set arbitrary details for the Position.void
setOrderPositionSplits
(Set<ShippingOrderPositionSplit> orderPositionSplits) Set the OrderPositionSplits of this Position.void
setProduct
(Product product) void
setQtyAllocated
(org.openwms.core.units.api.Measurable qtyAllocated) void
setQtyCrossdock
(org.openwms.core.units.api.Measurable qtyCrossdock) Methods inherited from class org.openwms.wms.shipping.impl.AbstractShippingOrderPosition
changeOrderState, changePriority, getEarliestStartDate, getLatestDueDate, getNextAllocationDate, getNextSplitNumber, getOrder, getOrderState, getPositionNo, getPriority, getProblem, getSourceLocationGroupNames, getStartMode, getTarget, hasStartMode, isLocked, setEarliestStartDate, setLatestDueDate, setLocked, setNextAllocationDate, setOrder, setOrderState, setPersistentKey, setPositionNo, setPriority, setProblem, setSourceLocationGroupNames, setStartMode, setTarget, toString
Methods inherited from class org.ameba.integration.jpa.ApplicationEntity
getPersistentKey, hasPersistentKey, onEntityPersist, onPersist
Methods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setCreatedBy, setCreateDt, setLastModifiedBy, setLastModifiedDt, setOl
-
Field Details
-
product
@NotNull(message="{owms.wms.shp.product}", groups=Create.class) private @NotNull(message="{owms.wms.shp.product}",groups=Create.class) Product productThe orderedProduct
. -
qtyDemanded
@NotNull(message="{owms.wms.shp.qtyDemanded}", groups=Create.class) private @NotNull(message="{owms.wms.shp.qtyDemanded}",groups=Create.class) org.openwms.core.units.api.Measurable<?,?, qtyDemanded?> The quantity that was originally demanded. -
qtyCrossdock
private org.openwms.core.units.api.Measurable<?,?, qtyCrossdock?> The quantity planned for cross-docking. -
qtyAllocated
private org.openwms.core.units.api.Measurable<?,?, qtyAllocated?> The quantity that has been allocated. -
orderPositionSplits
All Splits created from this Position. -
details
Arbitrary details of this Position.
-
-
Constructor Details
-
ShippingOrderPosition
protected ShippingOrderPosition()Used by the JPA provider. -
ShippingOrderPosition
@ConstructorProperties({"order","positionNo","qtyDemanded","product"}) public ShippingOrderPosition(@NotNull @NotNull ShippingOrder order, @NotNull @NotNull Integer positionNo, @NotNull @NotNull org.openwms.core.units.api.Measurable<?, ?, ?> qtyDemanded, @NotNull @NotNull Product product) Create a new ShippingOrderPosition with the mandatory attributes.@Default
is for the mapper. Note that none of the arguments is checked for null, because the Mapper might need to create Entity Objects partially for partial PATCH updates.- Parameters:
order
- The OrderpositionNo
- The position numberqtyDemanded
- The ordered quantityproduct
- The ordered Product
-
-
Method Details
-
isAllocated
public boolean isAllocated()Check if the demanded quantity of this Position is fulfilled by the sum of all Splits.- Specified by:
isAllocated
in classAbstractShippingOrderPosition<ShippingOrderPositionSplit>
- Returns:
- true if demanded quantity is equal to assigned quantity, otherwise false
-
getOrderPositionSplits
Get all created OrderPositionSplits that belong to this Position.- Specified by:
getOrderPositionSplits
in classAbstractShippingOrderPosition<ShippingOrderPositionSplit>
- Returns:
- The splits as Set
-
setOrderPositionSplits
Set the OrderPositionSplits of this Position.- Specified by:
setOrderPositionSplits
in classAbstractShippingOrderPosition<ShippingOrderPositionSplit>
- Parameters:
orderPositionSplits
- The splits to set
-
addSplits
Add one or more Splits to this Position.- Specified by:
addSplits
in classAbstractShippingOrderPosition<ShippingOrderPositionSplit>
- Parameters:
splits
- Splits to add
-
getDetails
Get the arbitrary details of the Position.- Specified by:
getDetails
in classAbstractShippingOrderPosition<ShippingOrderPositionSplit>
- Returns:
- The details as Map
-
setDetails
Set arbitrary details for the Position.- Specified by:
setDetails
in classAbstractShippingOrderPosition<ShippingOrderPositionSplit>
- Parameters:
details
- The details to set as Map
-
equals
No splits. All fields.- Overrides:
equals
in classAbstractShippingOrderPosition<ShippingOrderPositionSplit>
-
hashCode
public int hashCode()No splits. All fields.- Overrides:
hashCode
in classAbstractShippingOrderPosition<ShippingOrderPositionSplit>
-
getProduct
-
setProduct
-
getQtyDemanded
public org.openwms.core.units.api.Measurable getQtyDemanded() -
getQtyCrossdock
public org.openwms.core.units.api.Measurable getQtyCrossdock() -
setQtyCrossdock
public void setQtyCrossdock(org.openwms.core.units.api.Measurable qtyCrossdock) -
getQtyAllocated
public org.openwms.core.units.api.Measurable getQtyAllocated() -
setQtyAllocated
public void setQtyAllocated(org.openwms.core.units.api.Measurable qtyAllocated)
-