Package org.dspace.eperson
Class Group
- java.lang.Object
-
- org.dspace.content.DSpaceObject
-
- org.dspace.eperson.Group
-
- All Implemented Interfaces:
Serializable,DSpaceObjectLegacySupport,ReloadableEntity<UUID>
@Entity public class Group extends DSpaceObject implements DSpaceObjectLegacySupport
Class representing a group of e-people.- Author:
- David Stuve
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringADMINstatic StringANONYMOUS-
Fields inherited from class org.dspace.content.DSpaceObject
id, predefinedUUID
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGroup()Protected constructor, create object using:GroupService.create(Context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearGroupsChanged()booleanequals(Object obj)Returntrueifotheris the same Group as this object,falseotherwiseIntegergetLegacyId()List<Group>getMemberGroups()Return Group members (i.e.List<EPerson>getMembers()Return EPerson members of a Group.StringgetName()intgetType()Get the type of this object, found in ConstantsinthashCode()booleanisGroupsChanged()BooleanisPermanent()May this Group be renamed or deleted? (The content of any group may be changed.)-
Methods inherited from class org.dspace.content.DSpaceObject
addDetails, addHandle, addMetadata, clearDetails, clearModified, getDetails, getHandle, getHandles, getID, getMetadata, getPredefinedUUID, getResourcePolicies, isMetadataModified, isModified, removeMetadata, removeMetadata, setMetadata, setMetadataModified, setModified
-
-
-
-
Field Detail
-
ANONYMOUS
public static final String ANONYMOUS
- See Also:
- Constant Field Values
-
ADMIN
public static final String ADMIN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Group
protected Group()
Protected constructor, create object using:GroupService.create(Context)
-
-
Method Detail
-
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)
Returntrueifotheris the same Group as this object,falseotherwise
-
getType
public int getType()
Description copied from class:DSpaceObjectGet the type of this object, found in Constants- Specified by:
getTypein classDSpaceObject- Returns:
- type of the object
-
getName
public String getName()
- Specified by:
getNamein classDSpaceObject
-
isGroupsChanged
public boolean isGroupsChanged()
-
clearGroupsChanged
public void clearGroupsChanged()
-
getLegacyId
public Integer getLegacyId()
- Specified by:
getLegacyIdin interfaceDSpaceObjectLegacySupport- 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.
-
-