org.openwms.common.domain
Class TransportUnitType

java.lang.Object
  extended by org.openwms.core.domain.AbstractEntity
      extended by org.openwms.common.domain.TransportUnitType
All Implemented Interfaces:
Serializable, DomainObject<Long>

public class TransportUnitType
extends AbstractEntity
implements DomainObject<Long>

A TransportUnitType is a type of a certain TransportUnits.

Typically to store some static attributes of TransportUnits, such as the length, the height, or the weight of TransportUnits. It is possible to group and characterize TransportUnits.

Since:
0.1
Version:
$Revision: 1594 $
Author:
Heiko Scherrer
See Also:
TransportUnit, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity
AbstractEntity.AbstractEntityListener
 
Field Summary
static String DEF_TYPE_DESCRIPTION
          Default description of the TransportUnitType.
static String NQ_FIND_ALL
          Query to find all TransportUnitTypes.
static String NQ_FIND_BY_NAME
          Query to find one TransportUnitType by its natural key.
 
Fields inherited from class org.openwms.core.domain.AbstractEntity
FIND_ALL, FIND_BY_ID
 
Constructor Summary
TransportUnitType(String type)
          Create a new TransportUnitType.
 
Method Summary
 boolean addTypePlacingRule(TypePlacingRule typePlacingRule)
          Add a rule to the TransportUnitType.
 String getCompatibility()
          Returns the compatibility of the TransportUnitType.
 String getDescription()
          Returns the description of the TransportUnitType.
 int getHeight()
          Returns the height of the TransportUnitType.
 Long getId()
          Return the technical key value.
 int getLength()
          Get the length of the TransportUnitType.
 BigDecimal getPayload()
          Returns the payload of the TransportUnitType.
 Set<TransportUnit> getTransportUnits()
          Returns a Set of all TransportUnits belonging to the TransportUnitType.
 String getType()
          Returns the type of the TransportUnitType.
 Set<TypePlacingRule> getTypePlacingRules()
          Returns all TypePlacingRules belonging to the TransportUnitType.
 Set<TypeStackingRule> getTypeStackingRules()
          Returns a Set of all TypeStackingRules.
 long getVersion()
          Return the value of the optimistic locking field.
 BigDecimal getWeightMax()
          Get the weightMax.
 BigDecimal getWeightTare()
          Get the weightTare.
 int getWidth()
          Returns the width of the TransportUnitType.
 boolean isNew()
          Check whether the instance is a transient or persisted one.
 boolean removeTypePlacingRule(TypePlacingRule typePlacingRule)
          Remove a TypePlacingRule from the collection or rules.
 void setCompatibility(String compatibility)
          Set the compatibility of the TransportUnitType.
 void setDescription(String description)
          Set the description for the TransportUnitType.
 void setHeight(int height)
          Set the height of the TransportUnitType.
 void setLength(int length)
          Set the length of the TransportUnitType.
 void setPayload(BigDecimal payload)
          Set the payload of the TransportUnitType.
 void setTransportUnits(Set<TransportUnit> transportUnits)
          Assign a Set of TransportUnits to the TransportUnitType.
 void setType(String type)
          Set the type of the TransportUnitType.
 void setTypePlacingRules(Set<TypePlacingRule> typePlacingRules)
          Assign a Set of TypePlacingRules to the TransportUnitType.
 void setTypeStackingRules(Set<TypeStackingRule> typeStackingRules)
          Assign a Set of TypeStackingRules.
 void setWeightMax(BigDecimal weightMax)
          Set the weightMax.
 void setWeightTare(BigDecimal weightTare)
          Set the weightTare.
 void setWidth(int width)
          Set the width of the TransportUnitType.
 String toString()
          Returns the type.
 
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

NQ_FIND_ALL

public static final String NQ_FIND_ALL
Query to find all TransportUnitTypes.

See Also:
Constant Field Values

NQ_FIND_BY_NAME

public static final String NQ_FIND_BY_NAME
Query to find one TransportUnitType by its natural key.

See Also:
Constant Field Values

DEF_TYPE_DESCRIPTION

public static final String DEF_TYPE_DESCRIPTION
Default description of the TransportUnitType. Default value}.

See Also:
Constant Field Values
Constructor Detail

TransportUnitType

public TransportUnitType(String type)
Create a new TransportUnitType.

Parameters:
type - Unique name
Method Detail

getType

public String getType()
Returns the type of the TransportUnitType.

Returns:
The type

getId

public Long getId()
Return the technical key value.

Specified by:
getId in interface DomainObject<Long>
Returns:
The technical, unique key

isNew

public boolean isNew()
Check whether the instance is a transient or persisted one.

Specified by:
isNew in interface DomainObject<Long>
Returns:
true if transient (not persisted before), otherwise false

setType

public void setType(String type)
Set the type of the TransportUnitType.

Parameters:
type - The type to set

getWidth

public int getWidth()
Returns the width of the TransportUnitType.

Returns:
The width

setWidth

public void setWidth(int width)
Set the width of the TransportUnitType.

Parameters:
width - The width to set

getDescription

public String getDescription()
Returns the description of the TransportUnitType.

Returns:
The description text

setDescription

public void setDescription(String description)
Set the description for the TransportUnitType.

Parameters:
description - The description to set

getHeight

public int getHeight()
Returns the height of the TransportUnitType.

Returns:
The height

setHeight

public void setHeight(int height)
Set the height of the TransportUnitType.

Parameters:
height - The height to set

getPayload

public BigDecimal getPayload()
Returns the payload of the TransportUnitType.

Returns:
The payload

setPayload

public void setPayload(BigDecimal payload)
Set the payload of the TransportUnitType.

Parameters:
payload - The payload to set

getCompatibility

public String getCompatibility()
Returns the compatibility of the TransportUnitType.

Returns:
The compatibility

setCompatibility

public void setCompatibility(String compatibility)
Set the compatibility of the TransportUnitType.

Parameters:
compatibility - The compatibility to set

getLength

public int getLength()
Get the length of the TransportUnitType.

Returns:
The length

setLength

public void setLength(int length)
Set the length of the TransportUnitType.

Parameters:
length - The length to set

getTransportUnits

public Set<TransportUnit> getTransportUnits()
Returns a Set of all TransportUnits belonging to the TransportUnitType.

Returns:
A Set of all TransportUnits belonging to the TransportUnitType

setTransportUnits

public void setTransportUnits(Set<TransportUnit> transportUnits)
Assign a Set of TransportUnits to the TransportUnitType. Already existing TransportUnits will be removed.

Parameters:
transportUnits - A Set of TransportUnits.

addTypePlacingRule

public boolean addTypePlacingRule(TypePlacingRule typePlacingRule)
Add a rule to the TransportUnitType. A TypePlacingRule determines what TransportUnitTypes can be placed on which locations.

Parameters:
typePlacingRule - The rule to set
Returns:
true when the rule was added gracefully, otherwise false

removeTypePlacingRule

public boolean removeTypePlacingRule(TypePlacingRule typePlacingRule)
Remove a TypePlacingRule from the collection or rules.

Parameters:
typePlacingRule - The rule to be removed
Returns:
true when the rule was removed gracefully, otherwise false

getTypePlacingRules

public Set<TypePlacingRule> getTypePlacingRules()
Returns all TypePlacingRules belonging to the TransportUnitType.

Returns:
A Set of all placing rules

setTypePlacingRules

public void setTypePlacingRules(Set<TypePlacingRule> typePlacingRules)
Assign a Set of TypePlacingRules to the TransportUnitType. Already existing TypePlacingRules will be removed.

Parameters:
typePlacingRules - The rules to set

getTypeStackingRules

public Set<TypeStackingRule> getTypeStackingRules()
Returns a Set of all TypeStackingRules. A TypeStackingRule determines which other TransportUnitTypes can be placed on the TransportUnitType.

Returns:
A Set of all stacking rules

setTypeStackingRules

public void setTypeStackingRules(Set<TypeStackingRule> typeStackingRules)
Assign a Set of TypeStackingRules. A TypeStackingRule determines which TransportUnitTypes can be placed on the TransportUnitType. Already existing TypeStackingRule s will be removed.

Parameters:
typeStackingRules - The rules to set

getWeightTare

public BigDecimal getWeightTare()
Get the weightTare.

Returns:
The weightTare.

setWeightTare

public void setWeightTare(BigDecimal weightTare)
Set the weightTare.

Parameters:
weightTare - The weightTare to set.

getWeightMax

public BigDecimal getWeightMax()
Get the weightMax.

Returns:
The weightMax.

setWeightMax

public void setWeightMax(BigDecimal weightMax)
Set the weightMax.

Parameters:
weightMax - The weightMax to set.

getVersion

public long getVersion()
Return the value of the optimistic locking field.

Specified by:
getVersion in interface DomainObject<Long>
Returns:
the version number

toString

public String toString()
Returns the type.

Overrides:
toString in class Object
Returns:
as String
See Also:
Object.toString()


Copyright © 2005-2011 openwms.org. All Rights Reserved.