org.openwms.common.domain
Class TypePlacingRule

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

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

A TypePlacingRule is a Rule that defines which types of TransportUnits (TransportUnitTypes) can be put on which type of Location (LocationType).

A privilegeLevel is defined to order a list of allowed LocationTypes.

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
TypePlacingRule(TransportUnitType transportUnitType, LocationType allowedLocationType)
          Create a new TypePlacingRule with allowedLocationType.
TypePlacingRule(TransportUnitType transportUnitType, LocationType allowedLocationType, int privilegeLevel)
          Create a new TypePlacingRule with privilegeLevel and allowedLocationType.
 
Method Summary
 LocationType getAllowedLocationType()
          Get the allowedLocationType.
 Long getId()
          Return the technical key value.
 int getPrivilegeLevel()
          Get the privilegeLevel.
 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.
 void setPrivilegeLevel(int privilegeLevel)
          Set the privilegeLevel.
 
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

TypePlacingRule

public TypePlacingRule(TransportUnitType transportUnitType,
                       LocationType allowedLocationType,
                       int privilegeLevel)
Create a new TypePlacingRule with privilegeLevel and allowedLocationType.

Parameters:
transportUnitType - The TransportUnitType for this rule
allowedLocationType - The allowed LocationType
privilegeLevel - The privilege level

TypePlacingRule

public TypePlacingRule(TransportUnitType transportUnitType,
                       LocationType allowedLocationType)
Create a new TypePlacingRule with allowedLocationType.

Parameters:
transportUnitType - The TransportUnitType for this rule
allowedLocationType - The allowed LocationType
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.

getPrivilegeLevel

public int getPrivilegeLevel()
Get the privilegeLevel.

Returns:
The privilegeLevel.

setPrivilegeLevel

public void setPrivilegeLevel(int privilegeLevel)
Set the privilegeLevel.

Parameters:
privilegeLevel - The level to set

getAllowedLocationType

public LocationType getAllowedLocationType()
Get the allowedLocationType.

Returns:
The allowedLocationType.

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.