Class LocationGroup

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, Serializable, Cloneable, Comparable, Observer, Modifiable

public class LocationGroup extends NamedType
Represents a database location group owned by a location category.
See Also:
  • Field Details

  • 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 id
      categoryRef - the category ref
      groupDescription - the group description
      dbOfficeId - the db office id
      sharedLocAliasId - Shared location alias assigned to all members of this group by virtue of membership
      sharedLocationRef - 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 create
      groupDescription - group description
      sharedLocAliasId - Shared location alias assigned to all members of this group by virtue of membership
      sharedLocationRef - 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

      public LocationGroupRef getLocationGroupRef()
    • setLocationGroupRef

      public void setLocationGroupRef(LocationGroupRef groupRef)
    • buildElement

      public void buildElement(org.jdom.Element element)
      Builds the element.
      Parameters:
      element - the element
    • getGroupDescription

      public String getGroupDescription()
      Gets the group description.
      Returns:
      the group description
    • setGroupDescription

      public void setGroupDescription(String groupDescription)
      Sets the group description.
      Parameters:
      groupDescription - the new group description
    • getId

      public String getId()
      Gets the group id.
      Returns:
      the group id
    • setId

      public void setId(String groupId)
      Sets the group id.
      Parameters:
      groupId - the new group id
    • getDbOfficeId

      public String getDbOfficeId()
      Gets the db office id.
      Returns:
      the db office id
    • setDbOfficeId

      public void setDbOfficeId(String dbOfficeId)
      Sets the db office id.
      Parameters:
      dbOfficeId - the new db office id
    • getCategoryRef

      public LocationCategoryRef getCategoryRef()
      Gets the category ref.
      Returns:
      the category ref
    • setCategoryRef

      public void setCategoryRef(LocationCategoryRef categoryRef)
      Sets the category ref.
      Parameters:
      categoryRef - the new category ref
    • getSharedLocAliasId

      public String getSharedLocAliasId()
    • setSharedLocAliasId

      public void setSharedLocAliasId(String aliasId)
    • getSharedLocRef

      public LocationTemplate getSharedLocRef()
    • setSharedLocRef

      public void setSharedLocRef(LocationTemplate sharedLocRef)
    • getAssignedLocations

      public Set<AssignedLocation> getAssignedLocations()
      Gets the assigned locations by reference, this is not a copy so be careful.
      Returns:
      the assigned locations
    • getAssignedLocationsSorted

      public List<AssignedLocation> getAssignedLocationsSorted()
      Gets a list containing the assigned locations sorted by assigned_location.attribute.
      Returns:
      the assigned locations
    • setAssignedLocations

      public void setAssignedLocations(Set<AssignedLocation> assignedLocations)
      Sets the assigned locations.
      Parameters:
      assignedLocations - the new assigned locations
    • addAssignedLocation

      public void addAssignedLocation(AssignedLocation newLocation)
    • toXmlString

      public String toXmlString()
    • getCategoryId

      public String getCategoryId()
      Gets the category id from the containing category.
      Returns:
      the category id
    • removeLocation

      public AssignedLocation removeLocation(LocationTemplate location)
    • containsLocationRef

      public boolean containsLocationRef(LocationTemplate locationRef)
    • toString

      public String toString()
      Returns a String concatenation of the category id and group id separated by a "-".
      Overrides:
      toString in class NamedType