Package hec.data.location
Class LocationGroup
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.data.location.LocationGroup
- All Implemented Interfaces:
AsciiSerializable
,FieldAccessor
,Serializable
,Cloneable
,Comparable
,Observer
,Modifiable
Represents a database location group owned by a location category.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new location group.LocationGroup
(LocationGroupRef groupRef, String groupDescription, String sharedLocAliasId, LocationTemplate sharedLocationRef) Instantiates a new location group.LocationGroup
(String groupId, LocationCategoryRef categoryRef, String groupDescription, String dbOfficeId, String sharedLocAliasId, LocationTemplate sharedLocationRef) Instantiates a new location group.LocationGroup
(org.jdom.Element element) Instantiates a new location group. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAssignedLocation
(AssignedLocation newLocation) void
buildElement
(org.jdom.Element element) Builds the element.boolean
containsLocationRef
(LocationTemplate locationRef) Gets the assigned locations by reference, this is not a copy so be careful.Gets a list containing the assigned locations sorted by assigned_location.attribute.Gets the category id from the containing category.Gets the category ref.Gets the db office id.Gets the group description.getId()
Gets the group id.removeLocation
(LocationTemplate location) void
setAssignedLocations
(Set<AssignedLocation> assignedLocations) Sets the assigned locations.void
setCategoryRef
(LocationCategoryRef categoryRef) Sets the category ref.void
setDbOfficeId
(String dbOfficeId) Sets the db office id.void
setGroupDescription
(String groupDescription) Sets the group description.void
Sets the group id.void
setLocationGroupRef
(LocationGroupRef groupRef) void
setSharedLocAliasId
(String aliasId) void
setSharedLocRef
(LocationTemplate sharedLocRef) toString()
Returns a String concatenation of the category id and group id separated by a "-".Methods inherited from class hec.lang.NamedType
addModifiableListener, clone, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getFieldObject, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setFieldObject, setIgnoreModifiedEvents, setIndex, setModified, setName, setValid, update, useRecursiveModifiedTest
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Field Details
-
DESCRIPTION
- See Also:
-
SHARED_LOC_REF
- See Also:
-
SHARED_LOC_ALIAS_ID
- See Also:
-
LOC_GROUP_REF
- See Also:
-
ASSIGNED_LOCATION_SET
- See Also:
-
ASSIGNED_LOCATION
- See Also:
-
LOC_REF
- See Also:
-
ELEMENT
- See Also:
-
VERSION
- See Also:
-
-
Constructor Details
-
LocationGroup
public LocationGroup()Instantiates a new location group. -
LocationGroup
public LocationGroup(String groupId, LocationCategoryRef categoryRef, String groupDescription, String dbOfficeId, String sharedLocAliasId, LocationTemplate sharedLocationRef) Instantiates a new location group.- Parameters:
groupId
- the group idcategoryRef
- the category refgroupDescription
- the group descriptiondbOfficeId
- the db office idsharedLocAliasId
- Shared location alias assigned to all members of this group by virtue of membershipsharedLocationRef
- Shared reference to existing location assigned to all members of this group by virtue of membership
-
LocationGroup
public LocationGroup(LocationGroupRef groupRef, String groupDescription, String sharedLocAliasId, LocationTemplate sharedLocationRef) Instantiates a new location group.- Parameters:
groupRef
- reference to the group to creategroupDescription
- group descriptionsharedLocAliasId
- Shared location alias assigned to all members of this group by virtue of membershipsharedLocationRef
- Shared reference to existing location assigned to all members of this group by virtue of membership
-
LocationGroup
public LocationGroup(org.jdom.Element element) Instantiates a new location group.- Parameters:
element
- the element
-
-
Method Details
-
getLocationGroupRef
-
setLocationGroupRef
-
buildElement
public void buildElement(org.jdom.Element element) Builds the element.- Parameters:
element
- the element
-
getGroupDescription
Gets the group description.- Returns:
- the group description
-
setGroupDescription
Sets the group description.- Parameters:
groupDescription
- the new group description
-
getId
Gets the group id.- Returns:
- the group id
-
setId
Sets the group id.- Parameters:
groupId
- the new group id
-
getDbOfficeId
Gets the db office id.- Returns:
- the db office id
-
setDbOfficeId
Sets the db office id.- Parameters:
dbOfficeId
- the new db office id
-
getCategoryRef
Gets the category ref.- Returns:
- the category ref
-
setCategoryRef
Sets the category ref.- Parameters:
categoryRef
- the new category ref
-
getAssignedLocations
Gets the assigned locations by reference, this is not a copy so be careful.- Returns:
- the assigned locations
-
getAssignedLocationsSorted
Gets a list containing the assigned locations sorted by assigned_location.attribute.- Returns:
- the assigned locations
-
setAssignedLocations
Sets the assigned locations.- Parameters:
assignedLocations
- the new assigned locations
-
addAssignedLocation
-
toXmlString
-
getCategoryId
Gets the category id from the containing category.- Returns:
- the category id
-
removeLocation
-
containsLocationRef
-
toString
Returns a String concatenation of the category id and group id separated by a "-".
-