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
Products in a
particular quantity.- Author:
- Heiko Scherrer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @NotNull(groups=CreateQuantityReceipt.class) ProductThe expectedProductto 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
ConstructorsModifierConstructorDescriptionprotectedUsed by the JPA provider.ReceivingOrderPosition(Integer posNo, org.openwms.core.units.api.Measurable quantityExpected, Product product) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(BaseReceivingOrderPositionVisitor visitor) org.openwms.core.units.api.MeasurableaddQuantityReceived(org.openwms.core.units.api.Measurable quantityReceived) voidchangePositionState(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.booleanAll fields without the details map.private ProductgetProduct(ServiceProvider serviceProvider, String sku) org.openwms.core.units.api.Measurableorg.openwms.core.units.api.MeasurableinthashCode()All fields without the details map.booleanvoidpreCreate(ServiceProvider serviceProvider) Subclasses have the chance for manipulation before creation.voidsetProduct(Product product) voidsetQuantityExpected(org.openwms.core.units.api.Measurable quantityExpected) voidsetQuantityReceived(org.openwms.core.units.api.Measurable quantityReceived) voidvalidateOnCreation(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, toStringMethods 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 expectedProductto be receipt.
-
-
Constructor Details
-
ReceivingOrderPosition
protected ReceivingOrderPosition()Used by the JPA provider. -
ReceivingOrderPosition
-
-
Method Details
-
validateOnCreation
Description copied from class:AbstractReceivingOrderPositionSubclasses may validate themselves.- Specified by:
validateOnCreationin classAbstractReceivingOrderPosition- Parameters:
validator- The Validator instanceclazz- The validation group
-
preCreate
Description copied from class:AbstractReceivingOrderPositionSubclasses have the chance for manipulation before creation.- Overrides:
preCreatein 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 toCOMPLETEDthequantityReceivedis set toquantityExpected.- Overrides:
changePositionStatein 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:
acceptin interfaceConvertable
-
equals
All fields without the details map. All fields.- Overrides:
equalsin classAbstractReceivingOrderPosition
-
hashCode
public int hashCode()All fields without the details map. All fields.- Overrides:
hashCodein classAbstractReceivingOrderPosition
-