org.openwms.common.domain
Class LocationGroup

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

public class LocationGroup
extends AbstractEntity
implements DomainObject<Long>, Target

A LocationGroup is a logical group of Locations, grouping together Locations with same characteristics.

Since:
0.1
Version:
$Revision: 1594 $
Author:
Heiko Scherrer
See Also:
Location, 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
LocationGroup(String name)
          Create a new LocationGroup with an unique name.
 
Method Summary
 boolean addLocation(Location location)
          Add a Location to the list of children.
 boolean addLocationGroup(LocationGroup locationGroup)
          Add a LocationGroup to the list of children.
 boolean equals(Object obj)
           Compare the uid property field.
 String getDescription()
          Returns the description text.
 LocationGroupState getGroupStateIn()
          Returns the infeed state of the LocationGroup.
 LocationGroupState getGroupStateOut()
          Return the outfeed state of the LocationGroup.
 String getGroupType()
          Returns the type of the LocationGroup.
 Long getId()
          Return the technical key value.
 Date getLastUpdated()
          Returns the date of the last modification.
 Set<LocationGroup> getLocationGroups()
          Return all child LocationGroup.
 Set<Location> getLocations()
          Return all Locations in an unmodifiable Collection.
 float getMaxFillLevel()
          Returns the maximum fill level of the LocationGroup.
The maximum fill level defines how many Locations of the LocationGroup can be occupied by TransportUnits.
 String getName()
          Returns the name of the LocationGroup.
 int getNoLocations()
          Returns the count of all sub Locations.
 LocationGroup getParent()
          Returns the parent LocationGroup.
 String getSystemCode()
          Returns the systemCode.
 long getVersion()
          Return the value of the optimistic locking field.
 int hashCode()
           Use the uid to calculate the hashCode.
 boolean isInfeedAllowed()
          Check whether infeed is allowed for the LocationGroup.
 boolean isInfeedBlocked()
          Check whether infeed of the LocationGroup is blocked.
 boolean isLocationGroupCountingActive()
          Returns the locationGroupCountingActive.
 boolean isNew()
          Check whether the instance is a transient or persisted one.
 boolean isOutfeedAllowed()
          Check whether outfeed is allowed for the LocationGroup.
 boolean isOutfeedBlocked()
          Check whether outfeed of the LocationGroup is blocked.
 boolean removeLocation(Location location)
          Remove a Location from the list of children.
 boolean removeLocationGroup(LocationGroup locationGroup)
          Remove a LocationGroup from the list of children.
 void setDescription(String description)
          Set the description text.
 void setGroupStateIn(LocationGroupState groupStateIn, LocationGroup locker)
          Change the infeed state of the LocationGroup.
 void setGroupStateOut(LocationGroupState groupStateOut, LocationGroup locker)
          Set the outfeed state of the LocationGroup.
 void setGroupType(String groupType)
          Set the type for the LocationGroup.
 void setLastUpdated(Date lastUpdated)
          Set the date of the last modification.
 void setLocationGroupCountingActive(boolean locationGroupCountingActive)
          Set the locationGroupCountingActive.
 void setMaxFillLevel(float maxFillLevel)
          Set the maximum fill level for the LocationGroup.
 void setName(String name)
          Set the name of the LocationGroup.
 void setParent(LocationGroup parent)
          Set the parent LocationGroup.
 void setSystemCode(String systemCode)
          Set the systemCode.
 String toString()
          Return the name of the LocationGroup as String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocationGroup

public LocationGroup(String name)
Create a new LocationGroup with an unique name.

Parameters:
name - The name of the LocationGroup
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

getName

public String getName()
Returns the name of the LocationGroup.

Returns:
The name of the LocationGroup

setName

public void setName(String name)
Set the name of the LocationGroup.

Parameters:
name - The name to set.

getGroupStateIn

public LocationGroupState getGroupStateIn()
Returns the infeed state of the LocationGroup.

Returns:
The state of infeed

isInfeedAllowed

public boolean isInfeedAllowed()
Check whether infeed is allowed for the LocationGroup.

Returns:
true if allowed, otherwise false.

isInfeedBlocked

public boolean isInfeedBlocked()
Check whether infeed of the LocationGroup is blocked.

Returns:
true if blocked, otherwise false.

isOutfeedAllowed

public boolean isOutfeedAllowed()
Check whether outfeed is allowed for the LocationGroup.

Returns:
true if allowed, otherwise false.

isOutfeedBlocked

public boolean isOutfeedBlocked()
Check whether outfeed of the LocationGroup is blocked.

Returns:
true if blocked, otherwise false.

setGroupStateIn

public void setGroupStateIn(LocationGroupState groupStateIn,
                            LocationGroup locker)
Change the infeed state of the LocationGroup.

Parameters:
groupStateIn - The state to set
locker - The LocationGroup that wants to lock/unlock this LocationGroup.

getGroupStateOut

public LocationGroupState getGroupStateOut()
Return the outfeed state of the LocationGroup.

Returns:
The state of outfeed

setGroupStateOut

public void setGroupStateOut(LocationGroupState groupStateOut,
                             LocationGroup locker)
Set the outfeed state of the LocationGroup.

Parameters:
groupStateOut - The state to set
locker - The LocationGroup that wants to lock/unlock this LocationGroup.

getNoLocations

public int getNoLocations()
Returns the count of all sub Locations.

Returns:
The count of Locations belonging to this LocationGroup

getMaxFillLevel

public float getMaxFillLevel()
Returns the maximum fill level of the LocationGroup.
The maximum fill level defines how many Locations of the LocationGroup can be occupied by TransportUnits.

The maximum fill level is a value between 0 and 1 and represents a percentage value.

Returns:
The maximum fill level

setMaxFillLevel

public void setMaxFillLevel(float maxFillLevel)
Set the maximum fill level for the LocationGroup.

Pass a value between 0 and 1.
For example maxFillLevel = 0.85 means: 85% of all Locations can be occupied.

Parameters:
maxFillLevel - The maximum fill level

getGroupType

public String getGroupType()
Returns the type of the LocationGroup.

Returns:
The type of the LocationGroup

setGroupType

public void setGroupType(String groupType)
Set the type for the LocationGroup.

Parameters:
groupType - The type of the LocationGroup

getLastUpdated

public Date getLastUpdated()
Returns the date of the last modification.

Returns:
lastUpdated.

setLastUpdated

public void setLastUpdated(Date lastUpdated)
Set the date of the last modification.

Parameters:
lastUpdated - The date to set

getDescription

public String getDescription()
Returns the description text.

Returns:
The Description as String

setDescription

public void setDescription(String description)
Set the description text.

Parameters:
description - The String to set as description text

getParent

public LocationGroup getParent()
Returns the parent LocationGroup.

Returns:
The parent LocationGroup

setParent

public void setParent(LocationGroup parent)
Set the parent LocationGroup.

Parameters:
parent - The LocationGroup to set as parent

getLocationGroups

public Set<LocationGroup> getLocationGroups()
Return all child LocationGroup.

Returns:
A set of all LocationGroup having this one as parent

addLocationGroup

public boolean addLocationGroup(LocationGroup locationGroup)
Add a LocationGroup to the list of children.

Parameters:
locationGroup - The LocationGroup to be added as a child
Returns:
true if the LocationGroup was new in the collection of LocationGroups, otherwise false

removeLocationGroup

public boolean removeLocationGroup(LocationGroup locationGroup)
Remove a LocationGroup from the list of children.

Parameters:
locationGroup - The LocationGroup to be removed from the list of children
Returns:
true if the LocationGroup was found and could be removed, otherwise false

getLocations

public Set<Location> getLocations()
Return all Locations in an unmodifiable Collection.

Returns:
A unmodifiable set of all Locations that belong to this LocationGroup

addLocation

public boolean addLocation(Location location)
Add a Location to the list of children.

Parameters:
location - The Location to be added as child
Returns:
true if the Location was new in the collection of Locations, otherwise false

removeLocation

public boolean removeLocation(Location location)
Remove a Location from the list of children.

Parameters:
location - The Location to be removed from the list of children
Returns:
true if the Location was found and could be removed, otherwise false

getSystemCode

public String getSystemCode()
Returns the systemCode.

Returns:
The systemCode

setSystemCode

public void setSystemCode(String systemCode)
Set the systemCode.

Parameters:
systemCode - The systemCode to set

isLocationGroupCountingActive

public boolean isLocationGroupCountingActive()
Returns the locationGroupCountingActive.

Returns:
The locationGroupCountingActive

setLocationGroupCountingActive

public void setLocationGroupCountingActive(boolean locationGroupCountingActive)
Set the locationGroupCountingActive.

Parameters:
locationGroupCountingActive - The locationGroupCountingActive to set

hashCode

public int hashCode()
Use the uid to calculate the hashCode.

Overrides:
hashCode in class AbstractEntity
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Compare the uid property field.

Overrides:
equals in class AbstractEntity
See Also:
Object.equals(java.lang.Object)

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()
Return the name of the LocationGroup as String.

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


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