Package org.openwms.common.location
Class LocationGroup
java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.ameba.integration.jpa.ApplicationEntity
org.openwms.common.location.Target
org.openwms.common.location.LocationGroup
- All Implemented Interfaces:
Serializable,org.ameba.integration.TypedEntity<Long>
A LocationGroup is a logical group of
Locations with same characteristics.- Author:
- Heiko Scherrer
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AccountThe LocationGroup might be assigned to anAccount.private StringDescription of theLocationGroup.private @NotNull LocationGroupStateState of infeed, controlled by the subsystem only.private @NotNull LocationGroupStateState of outfeed.private StringA type can be assigned to aLocationGroup.static final intLength of the name field; used for telegram mapping and for column definition.private booleanIs theLocationGroupincluded in the calculation ofTransportUnits.private Set<LocationGroup> ChildLocationGroups.ChildLocations.private floatMaximum fill level of theLocationGroup.private @NotBlank @Size(min=1,max=255) StringUnique identifier of aLocationGroup.private @NotBlank StringThe operation mode is controlled by the subsystem and defines the physical mode aLocationGroupis currently able to operate in.private LocationGroupParentLocationGroup.private LocationGroupReferences theLocationGroupthat locked thisLocationGroupfor infeed.private LocationGroupReferences theLocationGroupthat locked thisLocationGroupfor outfeed.private SubsystemThe subsystem like a PLC, that manages thisLocationGroup.Fields inherited from class org.ameba.integration.jpa.ApplicationEntity
C_ID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDear JPA...LocationGroup(@NotBlank String name) Create a newLocationGroupwith a unique name. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddLocation(Location location) Add aLocationto the list of children.booleanaddLocationGroup(LocationGroup locationGroup) Add aLocationGroupto the list of children.voidchangeGroupStateIn(LocationGroupState newGroupStateIn) Change the infeed state of theLocationGroup.private voidchangeGroupStateIn(LocationGroupState newGroupStateIn, LocationGroup lockLG) Change the infeed state of theLocationGroup.voidchangeGroupStateOut(LocationGroupState newGroupStateOut) Change the outfeed state of theLocationGroup.(package private) voidchangeGroupStateOut(LocationGroupState gStateOut, LocationGroup lockLg) Set the outfeed state of theLocationGroup.voidchangeState(LocationGroupState stateIn, LocationGroupState stateOut) Tries to change thegroupStateInandgroupStateOutof theLocationGroup.booleanReturn theAccountthisLocationGroupis assigned to.Returns the description text.Returns the infeed state of theLocationGroup.Return the outfeed state of theLocationGroup.Returns the type of theLocationGroup.Return all childLocationGroup.Return allLocations.floatReturns the maximum fill level of theLocationGroup.
The maximum fill level defines how manyLocations of theLocationGroupcan be occupied byTransportUnits.getName()Returns the name of theLocationGroup.intReturns the count of all subLocations.Get the current operation mode thisLocationGroupoperates in.Returns the parentLocationGroup.inthashCode()booleanCheck whether thisLocationGrouphasLocationGroups as children.booleanCheck whether thisLocationGrouphasLocations assigned.booleanWhether this LocationGroup has a parent LocationGroup or not.booleanCheck whether infeed is allowed for theLocationGroup.booleanCheck whether infeed of theLocationGroupis blocked.booleanReturns the locationGroupCountingActive.booleanCheck whether outfeed is allowed for theLocationGroup.booleanCheck whether outfeed of theLocationGroupis blocked.booleanremoveLocation(Location location) Remove aLocationfrom the list of children.booleanremoveLocationGroup(@NotNull LocationGroup locationGroup) Remove aLocationGroupfrom the list of children.voidsetAccount(Account account) Sets theAccountfor thisLocationGroup.voidsetDescription(String description) Set the description text.voidsetGroupType(String groupType) Set the type for theLocationGroup.voidsetLocationGroupCountingActive(boolean locationGroupCountingActive) Set the locationGroupCountingActive.voidsetLocationGroups(Set<LocationGroup> locationGroups) Sets the childLocationGroup.voidsetMaxFillLevel(float maxFillLevel) Set the maximum fill level for theLocationGroup.voidsetOperationMode(@NotBlank String operationMode) Set the current operation mode thisLocationGroupcan operate in.voidsetParent(LocationGroup parent) Sets the parentLocationGroupof thisLocationGroup.toString()Return the name of theLocationGroupas String.Methods inherited from class org.ameba.integration.jpa.ApplicationEntity
getPersistentKey, hasPersistentKey, onEntityPersist, onPersist, setPersistentKeyMethods inherited from class org.ameba.integration.jpa.BaseEntity
getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setCreatedBy, setCreateDt, setLastModifiedBy, setLastModifiedDt, setOl
-
Field Details
-
name
Unique identifier of aLocationGroup. -
LENGTH_NAME
public static final int LENGTH_NAMELength of the name field; used for telegram mapping and for column definition.- See Also:
-
account
The LocationGroup might be assigned to anAccount. -
description
Description of theLocationGroup. -
groupType
A type can be assigned to aLocationGroup. -
locationGroupCountingActive
private boolean locationGroupCountingActiveIs theLocationGroupincluded in the calculation ofTransportUnits. -
operationMode
The operation mode is controlled by the subsystem and defines the physical mode aLocationGroupis currently able to operate in. -
groupStateIn
State of infeed, controlled by the subsystem only. -
stateInLocker
References theLocationGroupthat locked thisLocationGroupfor infeed. -
groupStateOut
State of outfeed. -
stateOutLocker
References theLocationGroupthat locked thisLocationGroupfor outfeed. -
maxFillLevel
private float maxFillLevelMaximum fill level of theLocationGroup. -
subsystem
The subsystem like a PLC, that manages thisLocationGroup. -
parent
ParentLocationGroup. -
locationGroups
ChildLocationGroups. -
locations
ChildLocations.
-
-
Constructor Details
-
LocationGroup
protected LocationGroup()Dear JPA... -
LocationGroup
Create a newLocationGroupwith a unique name.- Parameters:
name- The name of theLocationGroupmust not be null
-
-
Method Details
-
getName
Returns the name of theLocationGroup.- Returns:
- The name of the
LocationGroup
-
getAccount
Return theAccountthisLocationGroupis assigned to.- Returns:
- The
Account
-
setAccount
Sets theAccountfor thisLocationGroup.- Parameters:
account- TheAccountto set for thisLocationGroup
-
isInfeedAllowed
public boolean isInfeedAllowed()Check whether infeed is allowed for theLocationGroup.- Returns:
- true if allowed, otherwise false.
-
isInfeedBlocked
public boolean isInfeedBlocked()Check whether infeed of theLocationGroupis blocked.- Returns:
- true if blocked, otherwise false.
-
isOutfeedAllowed
public boolean isOutfeedAllowed()Check whether outfeed is allowed for theLocationGroup.- Returns:
- true if allowed, otherwise false.
-
isOutfeedBlocked
public boolean isOutfeedBlocked()Check whether outfeed of theLocationGroupis blocked.- Returns:
- true if blocked, otherwise false.
-
getOperationMode
Get the current operation mode thisLocationGroupoperates in.- Returns:
- The operational mode
-
setOperationMode
Set the current operation mode thisLocationGroupcan operate in.- Parameters:
operationMode- The mode as an extensible String- See Also:
-
getGroupStateIn
Returns the infeed state of theLocationGroup.- Returns:
- The state of infeed
-
changeGroupStateIn
Change the infeed state of theLocationGroup.- Parameters:
newGroupStateIn- The state to set
-
changeGroupStateIn
Change the infeed state of theLocationGroup.- Parameters:
newGroupStateIn- The state to setlockLG- TheLocationGroupthat wants to lock/unlock thisLocationGroup.
-
getGroupStateOut
Return the outfeed state of theLocationGroup.- Returns:
- The state of outfeed
-
changeGroupStateOut
Change the outfeed state of theLocationGroup.- Parameters:
newGroupStateOut- The state to set
-
changeGroupStateOut
Set the outfeed state of theLocationGroup.- Parameters:
gStateOut- The state to setlockLg- TheLocationGroupthat wants to lock/unlock thisLocationGroup.
-
getNoLocations
public int getNoLocations()Returns the count of all subLocations.- Returns:
- The count of
Locations belonging to thisLocationGroup
-
getMaxFillLevel
public float getMaxFillLevel()Returns the maximum fill level of theLocationGroup.
The maximum fill level defines how manyLocations of theLocationGroupcan be occupied byTransportUnits.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 theLocationGroup.Pass a value between 0 and 1.
For example maxFillLevel = 0.85 means: 85% of allLocations can be occupied.- Parameters:
maxFillLevel- The maximum fill level
-
getGroupType
Returns the type of theLocationGroup.- Returns:
- The type of the
LocationGroup
-
setGroupType
Set the type for theLocationGroup.- Parameters:
groupType- The type of theLocationGroup
-
getDescription
Returns the description text.- Returns:
- The Description as String
-
setDescription
Set the description text.- Parameters:
description- The String to set as description text
-
getParent
Returns the parentLocationGroup.- Returns:
- The parent
LocationGroup
-
setParent
Sets the parentLocationGroupof thisLocationGroup.- Parameters:
parent- The parentLocationGroupto set
-
getLocationGroups
Return all childLocationGroup.- Returns:
- A set of all
LocationGrouphaving this one as parent
-
hasLocationGroups
public boolean hasLocationGroups()Check whether thisLocationGrouphasLocationGroups as children.- Returns:
- true if
LocationGroups are assigned, otherwise false
-
setLocationGroups
Sets the childLocationGroup.- Parameters:
locationGroups- the set of LocationGroups to set
-
addLocationGroup
Add aLocationGroupto the list of children.- Parameters:
locationGroup- TheLocationGroupto be added as a child- Returns:
- true if the
LocationGroupwas new in the collection ofLocationGroups, otherwise false
-
removeLocationGroup
Remove aLocationGroupfrom the list of children.- Parameters:
locationGroup- TheLocationGroupto be removed from the list of children- Returns:
- true if the
LocationGroupwas found and could be removed, otherwise false
-
getLocations
Return allLocations.- Returns:
Locations
-
hasLocations
public boolean hasLocations()Check whether thisLocationGrouphasLocations assigned.- Returns:
- true if
Locations are assigned, otherwise false
-
addLocation
Add aLocationto the list of children. -
removeLocation
Remove aLocationfrom the list of children. -
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()- Overrides:
hashCodein classorg.ameba.integration.jpa.ApplicationEntity- See Also:
-
equals
- Overrides:
equalsin classorg.ameba.integration.jpa.ApplicationEntity- See Also:
-
toString
Return the name of theLocationGroupas String. -
changeState
Tries to change thegroupStateInandgroupStateOutof theLocationGroup. A state change is only allowed when the parentLocationGroups state is not blocked.- Parameters:
stateIn- The new groupStateIn to set, or nullstateOut- The new groupStateOut to set, or null
-
hasParent
public boolean hasParent()Whether this LocationGroup has a parent LocationGroup or not.- Returns:
- true If it has a parent
-