|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openwms.core.domain.AbstractEntity
org.openwms.tms.domain.order.TransportOrder
public class TransportOrder
A TransportOrder is used to move TransportUnit
s from a current
Location
to a target Location
.
TransportUnit
,
Location
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity |
---|
AbstractEntity.AbstractEntityListener |
Field Summary | |
---|---|
static String |
NQ_FIND_ALL
Query to find all TransportOrder s. |
static String |
NQ_FIND_BY_TU
Query to find all TransportOrder s for a certain
TransportUnit . |
static String |
NQ_FIND_FOR_TU_IN_STATE
Query to find all TransportOrder s for a particular
TransportUnit in certain states. |
Fields inherited from class org.openwms.core.domain.AbstractEntity |
---|
FIND_ALL, FIND_BY_ID |
Constructor Summary | |
---|---|
TransportOrder()
|
Method Summary | |
---|---|
Date |
getCreationDate()
Returns the date when the TransportOrder was created. |
Date |
getDateUpdated()
Get the date when the TransportOrder was changed last time. |
Date |
getEndDate()
Get the endDate. |
Long |
getId()
Return the technical key value. |
PriorityLevel |
getPriority()
Returns the priority level of the TransportOrder . |
Problem |
getProblem()
Get the last Problem . |
Location |
getSourceLocation()
Get the sourceLocation. |
Date |
getStartDate()
Returns the date when the TransportOrder was started. |
TransportOrderState |
getState()
Returns the state of the TransportOrder . |
Location |
getTargetLocation()
Get the target Location of this TransportOrder . |
LocationGroup |
getTargetLocationGroup()
Get the targetLocationGroup. |
TransportUnit |
getTransportUnit()
Get the TransportUnit assigned to the TransportOrder
. |
long |
getVersion()
Return the value of the optimistic locking field. |
boolean |
isNew()
Check whether the instance is a transient or persisted one. |
protected void |
postUpdate()
JPA Lifecycle callback method to set the dateUpdated property when the TransportOrder is being modified. |
void |
setPriority(PriorityLevel priority)
Set the priority level of the TransportOrder . |
void |
setProblem(Problem problem)
Set the last Problem . |
void |
setSourceLocation(Location sourceLocation)
Set the sourceLocation. |
void |
setState(TransportOrderState newState)
Change the state of the TransportOrder regarding some rules. |
void |
setTargetLocation(Location targetLocation)
Set the target Location of this TransportOrder . |
void |
setTargetLocationGroup(LocationGroup targetLocationGroup)
Set the targetLocationGroup. |
void |
setTransportUnit(TransportUnit transportUnit)
Assign a TransportUnit to the TransportOrder . |
protected void |
validateStateChange(TransportOrderState newState)
Validate whether a state change is valid or not. |
Methods inherited from class org.openwms.core.domain.AbstractEntity |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NQ_FIND_ALL
TransportOrder
s.
public static final String NQ_FIND_BY_TU
TransportOrder
s for a certain
TransportUnit
. TransportUnit
to search for.
public static final String NQ_FIND_FOR_TU_IN_STATE
TransportOrder
s for a particular
TransportUnit
in certain states. TransportUnit
to search for.
TransportOrderState
s.
Constructor Detail |
---|
public TransportOrder()
Method Detail |
---|
protected void postUpdate()
TransportOrder
is being modified.
public Long getId()
getId
in interface DomainObject<Long>
public boolean isNew()
isNew
in interface DomainObject<Long>
true
if transient (not persisted before), otherwise
false
public PriorityLevel getPriority()
TransportOrder
.
public void setPriority(PriorityLevel priority)
TransportOrder
.
priority
- The priority to setpublic Date getStartDate()
TransportOrder
was started.
public TransportUnit getTransportUnit()
TransportUnit
assigned to the TransportOrder
.
public void setTransportUnit(TransportUnit transportUnit)
TransportUnit
to the TransportOrder
.
Setting the TransportUnit
to null
is allowed here to
unlink both.
transportUnit
- The transportUnit to be assignedpublic Date getCreationDate()
TransportOrder
was created.
public TransportOrderState getState()
TransportOrder
.
protected void validateStateChange(TransportOrderState newState) throws StateChangeException
TransportOrderState
enum class. But some other rules
are checked here too and an exception is thrown in case the sequence of
states is violated.
newState
- The new state of the order
StateChangeException
- when null
orTransportOrderState.INITIALIZED
public void setState(TransportOrderState newState) throws StateChangeException
TransportOrder
regarding some rules.
newState
- The new state of the order
StateChangeException
- in case
null
orTransportOrder
is in state
TransportOrderState.CREATED
and shall be manually
turned into something else then
TransportOrderState.INITIALIZED
or
TransportOrderState.CANCELED
TransportOrder
is
TransportOrderState.CREATED
and shall be
TransportOrderState.INITIALIZED
but it is incompletepublic Location getTargetLocation()
Location
of this TransportOrder
.
null
public void setTargetLocation(Location targetLocation)
Location
of this TransportOrder
.
targetLocation
- The location to move onpublic Date getDateUpdated()
TransportOrder
was changed last time.
public LocationGroup getTargetLocationGroup()
null
public void setTargetLocationGroup(LocationGroup targetLocationGroup)
targetLocationGroup
- The targetLocationGroup to set.public Problem getProblem()
Problem
.
public void setProblem(Problem problem)
Problem
.
problem
- The Problem
to set.public Date getEndDate()
public Location getSourceLocation()
public void setSourceLocation(Location sourceLocation)
sourceLocation
- The sourceLocation to setpublic long getVersion()
getVersion
in interface DomainObject<Long>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |