Package org.openwms.wms.receiving.impl
Class ReceivingOrderPosition
java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.openwms.wms.receiving.impl.AbstractReceivingOrderPosition
org.openwms.wms.receiving.impl.ReceivingOrderPosition
- All Implemented Interfaces:
Serializable
,org.ameba.integration.TypedEntity<Long>
,Convertable
@Entity
public class ReceivingOrderPosition
extends AbstractReceivingOrderPosition
implements Convertable, Serializable
A ReceivingOrderPosition is a persisted entity class that represents an expected receipt of
Product
s in a
particular quantity.- Author:
- Heiko Scherrer
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate @NotNull(groups=CreateQuantityReceipt.class) Product
The expectedProduct
to be receipt.private @NotNull(groups=CreateQuantityReceipt.class) org.openwms.core.units.api.Measurable
<?, ?, ?> The quantity that is expected to be receipt.private org.openwms.core.units.api.Measurable
<?, ?, ?> The receipt quantity, this might be increased at arrival. -
Constructor Summary
ModifierConstructorDescriptionprotected
Used by the JPA provider.ReceivingOrderPosition
(Integer posNo, org.openwms.core.units.api.Measurable quantityExpected, Product product) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(BaseReceivingOrderPositionVisitor visitor) org.openwms.core.units.api.Measurable
addQuantityReceived
(org.openwms.core.units.api.Measurable quantityReceived) void
changePositionState
(org.springframework.context.ApplicationEventPublisher eventPublisher, PositionState positionState) Change the state of the position and publish a state change event if the new state has a higher ordinal value than the current state.private Product
getProduct
(ServiceProvider serviceProvider, String sku) org.openwms.core.units.api.Measurable
org.openwms.core.units.api.Measurable
boolean
void
preCreate
(ServiceProvider serviceProvider) Subclasses have the chance for manipulation before creation.void
setProduct
(Product product) void
setQuantityExpected
(org.openwms.core.units.api.Measurable quantityExpected) void
setQuantityReceived
(org.openwms.core.units.api.Measurable quantityReceived) void
validateOnCreation
(jakarta.validation.Validator validator, Class<?> clazz) Subclasses may validate themselves.Methods inherited from class org.openwms.wms.receiving.impl.AbstractReceivingOrderPosition
addDetail, doesStateAllowCapturing, getDetails, getExpectedReceiptWarehouse, getLatestDueDate, getOrder, getPosNo, getState, setDetails, setExpectedReceiptWarehouse, setLatestDueDate, setOrder, setState, toString
Methods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setCreatedBy, setCreateDt, setLastModifiedBy, setLastModifiedDt, setOl
-
Field Details
-
quantityExpected
@NotNull(groups=CreateQuantityReceipt.class) private @NotNull(groups=CreateQuantityReceipt.class) org.openwms.core.units.api.Measurable<?,?, quantityExpected?> The quantity that is expected to be receipt. -
quantityReceived
private org.openwms.core.units.api.Measurable<?,?, quantityReceived?> The receipt quantity, this might be increased at arrival. -
product
@NotNull(groups=CreateQuantityReceipt.class) private @NotNull(groups=CreateQuantityReceipt.class) Product productThe expectedProduct
to be receipt.
-
-
Constructor Details
-
ReceivingOrderPosition
protected ReceivingOrderPosition()Used by the JPA provider. -
ReceivingOrderPosition
-
-
Method Details
-
validateOnCreation
Description copied from class:AbstractReceivingOrderPosition
Subclasses may validate themselves.- Specified by:
validateOnCreation
in classAbstractReceivingOrderPosition
- Parameters:
validator
- The Validator instanceclazz
- The validation group
-
preCreate
Description copied from class:AbstractReceivingOrderPosition
Subclasses have the chance for manipulation before creation.- Overrides:
preCreate
in classAbstractReceivingOrderPosition
- Parameters:
serviceProvider
- An instance that provides application services.
-
getProduct
-
changePositionState
public void changePositionState(org.springframework.context.ApplicationEventPublisher eventPublisher, PositionState positionState) Change the state of the position and publish a state change event if the new state has a higher ordinal value than the current state. Additionally, recalculate the order state. If the state is set toCOMPLETED
thequantityReceived
is set toquantityExpected
.- Overrides:
changePositionState
in classAbstractReceivingOrderPosition
- Parameters:
eventPublisher
- The publisher to broadcast the state change event.positionState
- The new state to which the position is transitioning.
-
getQuantityExpected
public org.openwms.core.units.api.Measurable getQuantityExpected() -
setQuantityExpected
public void setQuantityExpected(org.openwms.core.units.api.Measurable quantityExpected) -
getQuantityReceived
public org.openwms.core.units.api.Measurable getQuantityReceived() -
addQuantityReceived
public org.openwms.core.units.api.Measurable addQuantityReceived(org.openwms.core.units.api.Measurable quantityReceived) -
setQuantityReceived
public void setQuantityReceived(org.openwms.core.units.api.Measurable quantityReceived) -
getProduct
-
hasProduct
public boolean hasProduct() -
setProduct
-
accept
- Specified by:
accept
in interfaceConvertable
-