|
||||||||||
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.common.domain.TransportUnit
public class TransportUnit
A TransportUnit is an item like a box, a toad, a bin or a palette that is moved around within a warehouse and can carry goods.
Used as container to transport items like LoadUnit
s. It can be
moved between Location
s.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity |
---|
AbstractEntity.AbstractEntityListener |
Field Summary | |
---|---|
static String |
NQ_FIND_ALL
Name of the NamedQuery to find all
TransportUnit Entities. |
static String |
NQ_FIND_BY_UNIQUE_QUERY
Query to find one TransportUnit by its
natural key. |
Fields inherited from class org.openwms.core.domain.AbstractEntity |
---|
FIND_ALL, FIND_BY_ID |
Constructor Summary | |
---|---|
TransportUnit(Barcode barcode)
Create a new TransportUnit with an unique Barcode . |
|
TransportUnit(String unitId)
Create a new TransportUnit with an unique id. |
Method Summary | |
---|---|
void |
addChild(TransportUnit transportUnit)
Add a TransportUnit to the children. |
UnitError |
addError(UnitError error)
Add an error to the TransportUnit . |
Location |
getActualLocation()
Get the actual Location of the TransportUnit . |
Date |
getActualLocationDate()
Returns the date when the TransportUnit moved to the
actualLocation. |
Barcode |
getBarcode()
Return the Barcode of the TransportUnit . |
Set<TransportUnit> |
getChildren()
Get all child TransportUnit s. |
Date |
getCreationDate()
Returns the creation date of the TransportUnit . |
Map<Date,UnitError> |
getErrors()
Get all errors that have occurred on the TransportUnit . |
Long |
getId()
Return the technical key value. |
Date |
getInventoryDate()
Returns the timestamp of the last inventory check of the TransportUnit . |
User |
getInventoryUser()
Returns the User who performed the last inventory action on the
TransportUnit . |
int |
getNoTransportUnits()
Number of TransportUnit s belonging to the
TransportUnit . |
TransportUnit |
getParent()
Returns the parent TransportUnit . |
TransportUnitState |
getState()
Return the state of the TransportUnit . |
Location |
getTargetLocation()
Get the target Location of the TransportUnit . |
TransportUnitType |
getTransportUnitType()
Return the TransportUnitType of the TransportUnit . |
long |
getVersion()
Return the value of the optimistic locking field. |
BigDecimal |
getWeight()
Returns the current weight of the TransportUnit . |
Boolean |
isEmpty()
Indicates whether the TransportUnit is empty or not. |
boolean |
isNew()
Check whether the instance is a transient or persisted one. |
void |
removeChild(TransportUnit transportUnit)
Remove a TransportUnit from the list of children. |
void |
setActualLocation(Location actualLocation)
Put the TransportUnit on a Location . |
void |
setActualLocationDate(Date actualLocationDate)
Set the actualLocationDate. |
void |
setBarcode(Barcode barcode)
Set the Barcode of the TransportUnit . |
void |
setEmpty(Boolean empty)
Marks the TransportUnit to be empty. |
void |
setInventoryDate(Date inventoryDate)
Set the timestamp of the last inventory action of the TransportUnit . |
void |
setInventoryUser(User inventoryUser)
Set the User > who performed the last inventory action on the
TransportUnit . |
void |
setParent(TransportUnit parent)
Set a parent TransportUnit . |
void |
setState(TransportUnitState state)
Set the state of the TransportUnit . |
void |
setTargetLocation(Location targetLocation)
Set the target Location of the TransportUnit . |
void |
setTransportUnitType(TransportUnitType transportUnitType)
Set the TransportUnitType of the TransportUnit . |
void |
setWeight(BigDecimal weight)
Sets the current weight of the TransportUnit . |
String |
toString()
Return the Barcode as String. |
Methods inherited from class org.openwms.core.domain.AbstractEntity |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NQ_FIND_ALL
NamedQuery
to find all
TransportUnit
Entities.
public static final String NQ_FIND_BY_UNIQUE_QUERY
TransportUnit
by its
natural key.
TransportUnit
to search for.
Constructor Detail |
---|
public TransportUnit(String unitId)
TransportUnit
with an unique id. The id is used
to create a Barcode
.
unitId
- The unique identifier of the TransportUnit
public TransportUnit(Barcode barcode)
TransportUnit
with an unique Barcode
.
barcode
- The unique identifier of this TransportUnit
is
the Barcode
Method Detail |
---|
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 Location getActualLocation()
Location
of the TransportUnit
.
Location
where the TransportUnit
is
placed onpublic void setActualLocation(Location actualLocation)
TransportUnit
on a Location
.
actualLocation
- The new Location
of the TransportUnit
public Location getTargetLocation()
Location
of the TransportUnit
. This
property can not be null
when an active
TransportOrder
exists.
public void setTargetLocation(Location targetLocation)
Location
of the TransportUnit
. Shall
only be set in combination with an active TransportOder
.
targetLocation
- The target Location
where this
TransportUnit
shall be transported topublic Boolean isEmpty()
TransportUnit
is empty or not.
true
if empty, false
if not empty,
null
when not definedpublic void setEmpty(Boolean empty)
TransportUnit
to be empty.
empty
- true
to mark the TransportUnit
as
empty, false
to mark it as not empty and
null
for no definitionpublic User getInventoryUser()
User
who performed the last inventory action on the
TransportUnit
.
User
who did the last inventory checkpublic void setInventoryUser(User inventoryUser)
User
> who performed the last inventory action on the
TransportUnit
.
inventoryUser
- The User
who did the last inventory checkpublic int getNoTransportUnits()
TransportUnit
s belonging to the
TransportUnit
.
TransportUnit
s belonging to this
onepublic Date getCreationDate()
TransportUnit
.
public Date getActualLocationDate()
TransportUnit
moved to the
actualLocation.
TransportUnit
moved the last
timepublic Date getInventoryDate()
TransportUnit
.
TransportUnit
.public void setInventoryDate(Date inventoryDate)
TransportUnit
.
inventoryDate
- The timestamp of the last inventory checkpublic BigDecimal getWeight()
TransportUnit
.
TransportUnit
public void setWeight(BigDecimal weight)
TransportUnit
.
weight
- The current weight of the TransportUnit
public Map<Date,UnitError> getErrors()
TransportUnit
.
UnitError
s on the
TransportUnit
public UnitError addError(UnitError error)
TransportUnit
.
error
- An UnitError
to be added
IllegalArgumentException
- when something went wrongpublic TransportUnitState getState()
TransportUnit
.
TransportUnit
public void setState(TransportUnitState state)
TransportUnit
.
state
- The state to set on the TransportUnit
public TransportUnitType getTransportUnitType()
TransportUnitType
of the TransportUnit
.
TransportUnitType
the TransportUnit
belongs topublic void setTransportUnitType(TransportUnitType transportUnitType)
TransportUnitType
of the TransportUnit
.
transportUnitType
- The type of the TransportUnit
public Barcode getBarcode()
Barcode
of the TransportUnit
.
Barcode
public void setBarcode(Barcode barcode)
Barcode
of the TransportUnit
.
barcode
- The Barcode
to be set on the
TransportUnit
public TransportUnit getParent()
TransportUnit
.
public void setParent(TransportUnit parent)
TransportUnit
.
parent
- The parent to set.public Set<TransportUnit> getChildren()
TransportUnit
s.
public void addChild(TransportUnit transportUnit)
TransportUnit
to the children.
transportUnit
- The TransportUnit
to be added to the list of
children
IllegalArgumentException
- when transportUnit is null
public void removeChild(TransportUnit transportUnit)
TransportUnit
from the list of children.
transportUnit
- The TransportUnit
to be removed from the list of
children
IllegalArgumentException
- when transportUnit is null
or any other failure
occurspublic void setActualLocationDate(Date actualLocationDate)
actualLocationDate
- The actualLocationDate to set.public long getVersion()
getVersion
in interface DomainObject<Long>
public String toString()
Barcode
as String.
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |