Class Movement

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

@Entity public class Movement extends org.ameba.integration.jpa.ApplicationEntity implements Serializable
A Movement is a simple task to move a TransportUnit from one source Location to a target Location. This is often used for manual warehouses or manual activities.
Author:
Heiko Scherrer
See Also:
  • Field Details

    • transportUnitBk

      @NotNull private @NotNull Barcode transportUnitBk
      The business key of the TransportUnit to move.
    • type

      @NotNull private @NotNull MovementType type
      Type of the Movement.
    • initiator

      @NotNull private @NotNull String initiator
      Initiator of the Movement, who ordered or triggered it.
    • group

      private MovementGroup group
      The MovementGroup, the Movement belongs to.
    • sku

      private String sku
      Refers to the demanded Product for that the Movement has been created.
    • priority

      @NotNull private @NotNull PriorityLevel priority
      A priority level of the Movement. The lower the value the lower the priority. The priority level affects the execution of the Movement. An order with high priority will be processed faster than those with lower priority.
    • mode

      @NotNull private @NotNull StartMode mode
      Defines how the resulting TransportOrder is started.
    • state

      private DefaultMovementState state
      The current state the Movement resides in.
    • message

      private Message message
      A message with the reason for this Movement.
    • problems

      private List<ProblemHistory> problems
      Reported problems on the Movement.
    • sourceLocation

      private String sourceLocation
      Where the Movement is picked up.
    • sourceLocationGroupName

      private String sourceLocationGroupName
      The name of the LocationGroup where the sourceLocation belongs to.
    • targetLocation

      @Null(groups=Create.class) private @Null(groups=Create.class) String targetLocation
      The target Location of the Movement. This property is set before the Movement is started.
    • targetLocationGroup

      @NotNull private @NotNull String targetLocationGroup
      A LocationGroup can also be set as target. At least one target must be set when the Movement is being started.
    • startEarliestDate

      @DateTimeFormat(pattern="yyyy-MM-dd\'T\'HH:mm:ssXXX") private ZonedDateTime startEarliestDate
      Date when the Movement can be started earliest.
    • startDate

      @DateTimeFormat(pattern="yyyy-MM-dd\'T\'HH:mm:ssXXX") private ZonedDateTime startDate
      Date when the Movement was started.
    • latestDueDate

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

      @DateTimeFormat(pattern="yyyy-MM-dd\'T\'HH:mm:ssXXX") private ZonedDateTime endDate
      Date when the Movement ended.
  • Constructor Details

    • Movement

      protected Movement()
      Dear JPA...
  • Method Details

    • addProblem

      public boolean addProblem(ProblemHistory problem)
      Add a new problem to the Movements problemHistory.
      Parameters:
      problem - The problem to store
      Returns:
      true if added successfully
    • emptyTargetLocation

      public boolean emptyTargetLocation()
      Check whether the targetLocation is empty.
      Returns:
      true if so
    • setInitiatorOrDefault

      public void setInitiatorOrDefault(String initiator, String defaultVal)
      Set the initiator, or the given default value.
      Parameters:
      initiator - The initiator
      defaultVal - The default value
    • hasSKU

      public boolean hasSKU()
      Checks if this Movement has a SKU set.
      Returns:
      true if so
    • initStartDate

      public void initStartDate(ZonedDateTime startDate)
      Set a startDate for this Movement if not already set.
      Parameters:
      startDate - The start date to set
    • getTransportUnitBk

      public Barcode getTransportUnitBk()
    • setTransportUnitBk

      public void setTransportUnitBk(Barcode transportUnitBk)
    • getType

      public MovementType getType()
    • getInitiator

      public String getInitiator()
    • setInitiator

      public void setInitiator(String initiator)
    • getGroup

      public MovementGroup getGroup()
    • getSku

      public String getSku()
    • setSku

      public void setSku(String sku)
    • getPriority

      public PriorityLevel getPriority()
    • getMode

      public StartMode getMode()
    • setMode

      public void setMode(StartMode mode)
    • getMessage

      public Message getMessage()
    • setMessage

      public void setMessage(Message message)
    • getState

      public DefaultMovementState getState()
    • setState

      public void setState(DefaultMovementState state)
    • getProblems

      public List<ProblemHistory> getProblems()
    • getSourceLocation

      public String getSourceLocation()
    • setSourceLocation

      public void setSourceLocation(String sourceLocation)
    • getSourceLocationGroupName

      public String getSourceLocationGroupName()
    • setSourceLocationGroupName

      public void setSourceLocationGroupName(String sourceLocationGroupName)
    • getTargetLocation

      public String getTargetLocation()
    • setTargetLocation

      public void setTargetLocation(String targetLocation)
    • getTargetLocationGroup

      public String getTargetLocationGroup()
    • emptyTargetLocationGroup

      public boolean emptyTargetLocationGroup()
    • setTargetLocationGroup

      public void setTargetLocationGroup(String targetLocationGroup)
    • getStartEarliestDate

      public ZonedDateTime getStartEarliestDate()
    • getStartDate

      public ZonedDateTime getStartDate()
    • setStartDate

      public void setStartDate(ZonedDateTime startDate)
    • getLatestDueDate

      public ZonedDateTime getLatestDueDate()
    • getEndDate

      public ZonedDateTime getEndDate()
    • setEndDate

      public void setEndDate(ZonedDateTime endDate)
    • toString

      public String toString()
      Not the group and not the history.
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Not the group and not the history.
      Overrides:
      equals in class org.ameba.integration.jpa.ApplicationEntity
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.ameba.integration.jpa.ApplicationEntity