Package org.openwms.wms.receiving.impl
Class AbstractReceivingOrderPosition
java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.openwms.wms.receiving.impl.AbstractReceivingOrderPosition
- All Implemented Interfaces:
Serializable
,org.ameba.integration.TypedEntity<Long>
- Direct Known Subclasses:
ReceivingOrderPosition
,ReceivingTransportUnitOrderPosition
@Entity
public abstract class AbstractReceivingOrderPosition
extends org.ameba.integration.jpa.BaseEntity
implements Serializable
A AbstractReceivingOrderPosition.
- Author:
- Heiko Scherrer
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionArbitrary detail information on this position, might be populated with ERP information.private String
The name of the warehouses' LocationGroup where theReceivingOrderPosition
is expected to be received.private ZonedDateTime
Latest date this position can be processed.private ReceivingOrder
private @NotNull Integer
The position number is a unique index within a singleReceivingOrder
instance.private @NotNull PositionState
Current position state. -
Constructor Summary
ModifierConstructorDescriptionprotected
Used by the JPA provider. -
Method Summary
Modifier and TypeMethodDescriptionAdd a new detail to theAbstractReceivingOrderPosition
.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.boolean
Capturing on an ReceivingOrderPosition is allowed if the state is any but notPositionState.CANCELED
.Get all the details of thisAbstractReceivingOrderPosition
.getOrder()
int
getPosNo()
getState()
void
preCreate
(ServiceProvider serviceProvider) Subclasses have the chance for manipulation before creation.void
setDetails
(Map<String, String> details) void
setExpectedReceiptWarehouse
(String expectedReceiptWarehouse) void
setLatestDueDate
(ZonedDateTime latestDueDate) void
setOrder
(ReceivingOrder order) void
setState
(PositionState state) toString()
Returns a string representation of this AbstractReceivingOrderPosition instance, which includes the order ID and position number.abstract void
validateOnCreation
(jakarta.validation.Validator validator, Class<?> clazz) Subclasses may validate themselves.Methods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setCreatedBy, setCreateDt, setLastModifiedBy, setLastModifiedDt, setOl
-
Field Details
-
order
-
posNo
The position number is a unique index within a singleReceivingOrder
instance. -
state
Current position state. -
details
Arbitrary detail information on this position, might be populated with ERP information. -
latestDueDate
Latest date this position can be processed. -
expectedReceiptWarehouse
The name of the warehouses' LocationGroup where theReceivingOrderPosition
is expected to be received.
-
-
Constructor Details
-
AbstractReceivingOrderPosition
protected AbstractReceivingOrderPosition()Used by the JPA provider. -
AbstractReceivingOrderPosition
-
-
Method Details
-
validateOnCreation
Subclasses may validate themselves.- Parameters:
validator
- The Validator instanceclazz
- The validation group
-
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.- Parameters:
eventPublisher
- The publisher to broadcast the state change event.positionState
- The new state to which the position is transitioning.
-
doesStateAllowCapturing
public boolean doesStateAllowCapturing()Capturing on an ReceivingOrderPosition is allowed if the state is any but notPositionState.CANCELED
.- Returns:
- if allowed
-
toString
Returns a string representation of this AbstractReceivingOrderPosition instance, which includes the order ID and position number. -
preCreate
Subclasses have the chance for manipulation before creation.- Parameters:
serviceProvider
- An instance that provides application services.
-
getOrder
-
setOrder
-
getPosNo
public int getPosNo() -
getState
-
setState
-
getDetails
Get all the details of thisAbstractReceivingOrderPosition
.- Returns:
- As Map
-
setDetails
-
addDetail
Add a new detail to theAbstractReceivingOrderPosition
.- Parameters:
key
- The unique key of the detailvalue
- The value as String- Returns:
- This instance
-
getLatestDueDate
-
setLatestDueDate
-
getExpectedReceiptWarehouse
-
setExpectedReceiptWarehouse
-