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 Details

    • order

      private ReceivingOrder order
    • posNo

      @NotNull private @NotNull Integer posNo
      The position number is a unique index within a single ReceivingOrder instance.
    • state

      @NotNull private @NotNull PositionState state
      Current position state.
    • details

      private Map<String,String> details
      Arbitrary detail information on this position, might be populated with ERP information.
    • latestDueDate

      private ZonedDateTime latestDueDate
      Latest date this position can be processed.
    • expectedReceiptWarehouse

      private String expectedReceiptWarehouse
      The name of the warehouses' LocationGroup where the ReceivingOrderPosition is expected to be received.
  • Constructor Details

    • AbstractReceivingOrderPosition

      protected AbstractReceivingOrderPosition()
      Used by the JPA provider.
    • AbstractReceivingOrderPosition

      public AbstractReceivingOrderPosition(Integer posNo)
  • Method Details

    • validateOnCreation

      public abstract void validateOnCreation(jakarta.validation.Validator validator, Class<?> clazz)
      Subclasses may validate themselves.
      Parameters:
      validator - The Validator instance
      clazz - 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 not PositionState.CANCELED.
      Returns:
      if allowed
    • toString

      public String toString()
      Returns a string representation of this AbstractReceivingOrderPosition instance, which includes the order ID and position number.
      Overrides:
      toString in class Object
      Returns:
      A string containing the order ID (or "n/a" if the order is null) and the position number.
    • preCreate

      public void preCreate(ServiceProvider serviceProvider)
      Subclasses have the chance for manipulation before creation.
      Parameters:
      serviceProvider - An instance that provides application services.
    • getOrder

      public ReceivingOrder getOrder()
    • setOrder

      public void setOrder(ReceivingOrder order)
    • getPosNo

      public int getPosNo()
    • getState

      public PositionState getState()
    • setState

      public void setState(PositionState state)
    • getDetails

      public Map<String,String> getDetails()
      Get all the details of this AbstractReceivingOrderPosition.
      Returns:
      As Map
    • setDetails

      public void setDetails(Map<String,String> details)
    • addDetail

      public AbstractReceivingOrderPosition addDetail(String key, String value)
      Add a new detail to the AbstractReceivingOrderPosition.
      Parameters:
      key - The unique key of the detail
      value - The value as String
      Returns:
      This instance
    • getLatestDueDate

      public ZonedDateTime getLatestDueDate()
    • setLatestDueDate

      public void setLatestDueDate(ZonedDateTime latestDueDate)
    • getExpectedReceiptWarehouse

      public String getExpectedReceiptWarehouse()
    • setExpectedReceiptWarehouse

      public void setExpectedReceiptWarehouse(String expectedReceiptWarehouse)