Class ShippingOrder

java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.ameba.integration.jpa.ApplicationEntity
org.openwms.wms.shipping.impl.ShippingOrder
All Implemented Interfaces:
Serializable, org.ameba.integration.TypedEntity<Long>

@Entity public class ShippingOrder extends org.ameba.integration.jpa.ApplicationEntity implements Serializable
An Order.
Author:
Heiko Scherrer
See Also:
  • Field Details

    • orderId

      @NotEmpty(message="{owms.wms.shp.orderId}", groups=Create.class) private @NotEmpty(message="{owms.wms.shp.orderId}",groups=Create.class) String orderId
      Unique business key.
    • customerNo

      private String customerNo
      Customer number.
    • orderState

      private OrderState orderState
      Current state of this Order.
    • shippingType

      private String shippingType
      Some arbitrary shipping type, like DHL, FedEx etc.
    • locked

      private boolean locked
      Property to lock/unlock an Order.
      • true: locked
      • false: unlocked
      Default is false
    • priority

      private int priority
      Current priority of the Order.
    • latestDueDate

      @DateTimeFormat(pattern="yyyy-MM-dd\'T\'HH:mm:ssXXX") private ZonedDateTime latestDueDate
      Latest finish date of this Order.
    • startDate

      @DateTimeFormat(pattern="yyyy-MM-dd\'T\'HH:mm:ssXXX") private ZonedDateTime startDate
      Earliest date when the Order has to be started.
    • nextAllocationDate

      @DateTimeFormat(pattern="yyyy-MM-dd\'T\'HH:mm:ssXXX") private ZonedDateTime nextAllocationDate
      Date when the Order should be allocated.
    • problem

      private Problem problem
      Latest problem that is occurred on this Order.
    • positions

      private Set<ShippingOrderPosition> positions
      All ShippingOrderPositions of this Order.
    • startMode

      private OrderStartMode startMode
      Defines how an Order is started. Default is OrderStartMode.MANUAL
    • details

      private Map<String,String> details
  • Constructor Details

    • ShippingOrder

      public ShippingOrder(String orderId)
      Create a new Order.
      Parameters:
      orderId - The order id
    • ShippingOrder

      protected ShippingOrder()
      Used by the JPA provider.
  • Method Details

    • prePersist

      protected void prePersist()
      Before the entity is persisted:
      • the orderState is set
    • setPersistentKey

      public void setPersistentKey(String pKey)
      Overrides:
      setPersistentKey in class org.ameba.integration.jpa.ApplicationEntity
    • changeOrderState

      public void changeOrderState(org.ameba.i18n.Translator translator, org.springframework.context.ApplicationEventPublisher eventPublisher, OrderState orderState)
      Change the state of this ShippingOrder.
      Parameters:
      translator - An instance of Translator to translate messages
      orderState - The new order state to set
      Throws:
      org.ameba.exception.BusinessRuntimeException - In case a state change is not allowed
    • addPostions

      ShippingOrder addPostions(ShippingOrderPosition... pos)
      Add one or more order positions to this order.
      Parameters:
      pos - OrderPositions to add
    • toString

      public String toString()

      Return the orderId.

      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)

      Just use the orderId

      Overrides:
      equals in class org.ameba.integration.jpa.ApplicationEntity
    • hashCode

      public int hashCode()

      Just use the orderId

      Overrides:
      hashCode in class org.ameba.integration.jpa.ApplicationEntity
    • hasPositions

      public boolean hasPositions()
    • clearPositions

      public void clearPositions()
    • clearDetails

      public void clearDetails()
    • getOrderKey

      public String getOrderKey()
    • getCustomerNo

      public String getCustomerNo()
    • setCustomerNo

      public void setCustomerNo(String customerNo)
    • getStartMode

      public OrderStartMode getStartMode()
    • setStartMode

      void setStartMode(OrderStartMode startMode)
    • getOrderState

      public OrderState getOrderState()
    • setOrderState

      void setOrderState(OrderState orderState)
    • getShippingType

      public String getShippingType()
    • setShippingType

      public void setShippingType(String shippingType)
    • getPositions

      public Set<ShippingOrderPosition> getPositions()
    • setPositions

      void setPositions(Set<ShippingOrderPosition> positions)
    • isLocked

      public boolean isLocked()
    • getPriority

      public int getPriority()
    • setPriority

      void setPriority(int priority)
    • getLatestDueDate

      ZonedDateTime getLatestDueDate()
    • setLatestDueDate

      void setLatestDueDate(ZonedDateTime latestDueDate)
    • getStartDate

      ZonedDateTime getStartDate()
    • setStartDate

      void setStartDate(ZonedDateTime startDate)
    • getNextAllocationDate

      ZonedDateTime getNextAllocationDate()
    • setNextAllocationDate

      void setNextAllocationDate(ZonedDateTime nextAllocationDate)
    • getProblem

      public Problem getProblem()
    • getDetails

      public Map<String,String> getDetails()
    • setDetails

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