Class Group

All Implemented Interfaces:
Serializable, DSpaceObjectLegacySupport, ReloadableEntity<UUID>

@Entity public class Group extends CacheableDSpaceObject implements DSpaceObjectLegacySupport
Class representing a group of e-people.
Author:
David Stuve
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getMembers

      public List<EPerson> getMembers()
      Return EPerson members of a Group.

      WARNING: This method may have bad performance for Groups with large numbers of EPerson members. Therefore, only use this when you need to access every EPerson member. Instead, consider using EPersonService.findByGroups() for a paginated list of EPersons.

      Returns:
      list of EPersons
    • getMemberGroups

      public List<Group> getMemberGroups()
      Return Group members (i.e. direct subgroups) of a Group.

      WARNING: This method may have bad performance for Groups with large numbers of Subgroups. Therefore, only use this when you need to access every Subgroup. Instead, consider using GroupService.findByParent() for a paginated list of Subgroups.

      Returns:
      list of subgroups
    • equals

      public boolean equals(Object obj)
      Return true if other is the same Group as this object, false otherwise
      Overrides:
      equals in class Object
      Parameters:
      obj - object to compare to
      Returns:
      true if object passed in represents the same group as this object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getType

      public int getType()
      Description copied from class: DSpaceObject
      Get the type of this object, found in Constants
      Specified by:
      getType in class DSpaceObject
      Returns:
      type of the object
    • getName

      public String getName()
      Specified by:
      getName in class DSpaceObject
    • isGroupsChanged

      public boolean isGroupsChanged()
    • clearGroupsChanged

      public void clearGroupsChanged()
    • getLegacyId

      public Integer getLegacyId()
      Specified by:
      getLegacyId in interface DSpaceObjectLegacySupport
      Returns:
      the old integer based legacy identifier
    • isPermanent

      public Boolean isPermanent()
      May this Group be renamed or deleted? (The content of any group may be changed.)
      Returns:
      true if this Group may not be renamed or deleted.