org.openwms.common.domain
Class TypeStackingRule

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

public class TypeStackingRule
extends AbstractEntity
implements DomainObject<Long>, Rule

A TypeStackingRule is a Rule that defines which TransportUnitType can be stacked on other types. Additionally a maximum number of TransportUnits can be defined.

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity
AbstractEntity.AbstractEntityListener
 
Field Summary
 
Fields inherited from class org.openwms.core.domain.AbstractEntity
FIND_ALL, FIND_BY_ID
 
Constructor Summary
TypeStackingRule(short noTransportUnits, TransportUnitType allowedTransportUnitType)
          Create a new TypeStackingRule.
 
Method Summary
 TransportUnitType getAllowedTransportUnitType()
          Returns the allowed TransportUnitType that may be placed on the owning TransportUnitType.
 Long getId()
          Return the technical key value.
 short getNoTransportUnits()
          Returns the number of TransportUnitTypes that may be placed on the owning TransportUnitType.
 TransportUnitType getTransportUnitType()
          Get the transportUnitType.
 long getVersion()
          Return the value of the optimistic locking field.
 boolean isNew()
          Check whether the instance is a transient or persisted one.
 
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
 

Constructor Detail

TypeStackingRule

public TypeStackingRule(short noTransportUnits,
                        TransportUnitType allowedTransportUnitType)
Create a new TypeStackingRule. Define how many TransportUnits of the allowedTransportUnitType may stacked on this TransportUnitType.

Parameters:
noTransportUnits - The number of allowed TransportUnits
allowedTransportUnitType - The allowed TransportUnitType
Method Detail

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

getTransportUnitType

public TransportUnitType getTransportUnitType()
Get the transportUnitType.

Returns:
The transportUnitType.

getNoTransportUnits

public short getNoTransportUnits()
Returns the number of TransportUnitTypes that may be placed on the owning TransportUnitType.

Returns:
The number of TransportUnits allowed

getAllowedTransportUnitType

public TransportUnitType getAllowedTransportUnitType()
Returns the allowed TransportUnitType that may be placed on the owning TransportUnitType.

Returns:
The allowed TransportUnitType

getVersion

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

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


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