public interface GroupDAO extends DSpaceObjectDAO<Group>, DSpaceObjectLegacySupportDAO<Group>
| Modifier and Type | Method and Description |
|---|---|
int |
countByNameLike(Context context,
String groupName)
Count the number of groups that have a name that contains the given string
|
int |
countRows(Context context)
Count the number of groups in DSpace
|
List<Group> |
findAll(Context context)
Find all groups ordered by name ascending
|
List<Group> |
findAll(Context context,
List<MetadataField> sortMetadataFields)
Find all groups ordered by the specified metadata fields ascending
|
List<Group> |
findByEPerson(Context context,
EPerson ePerson)
Find all groups that the given ePerson belongs to
|
Group |
findByIdAndMembership(Context context,
UUID id,
EPerson ePerson)
Find a group by its name and the membership of the given EPerson
|
List<Group> |
findByMetadataField(Context context,
String searchValue,
MetadataField metadataField)
Look up groups based on their value for a certain metadata field (NOTE: name is not stored as metadata)
|
Group |
findByName(Context context,
String name)
Find a group by its name (exact match)
|
List<Group> |
findByNameLike(Context context,
String groupName,
int offset,
int limit)
Find a group by its name (fuzzy match)
|
List<Group> |
getEmptyGroups(Context context)
Return all empty groups
|
List<org.apache.commons.lang3.tuple.Pair<UUID,UUID>> |
getGroup2GroupResults(Context context,
boolean flushQueries)
Get a list of all direct parent - child group relations in the database
|
findByLegacyIdcreate, delete, findAll, findByID, findByID, findMany, findUnique, saveList<Group> findByMetadataField(Context context, String searchValue, MetadataField metadataField) throws SQLException
context - The DSpace contextsearchValue - The value to matchmetadataField - The metadata field to search inSQLException - if database errorList<Group> findAll(Context context, List<MetadataField> sortMetadataFields) throws SQLException
context - The DSpace contextsortMetadataFields - The metadata fields to sort onSQLException - if database errorList<Group> findAll(Context context) throws SQLException
context - The DSpace contextSQLException - if database errorList<Group> findByEPerson(Context context, EPerson ePerson) throws SQLException
context - The DSpace contextePerson - The EPerson to matchSQLException - if database errorList<org.apache.commons.lang3.tuple.Pair<UUID,UUID>> getGroup2GroupResults(Context context, boolean flushQueries) throws SQLException
context - The DSpace contextflushQueries - Flush all pending queriesSQLException - if database errorList<Group> getEmptyGroups(Context context) throws SQLException
context - The DSpace contextSQLException - if database errorint countRows(Context context) throws SQLException
context - The DSpace contextSQLException - if database errorGroup findByName(Context context, String name) throws SQLException
context - The DSpace contextname - The name of the group to look forSQLException - if database errorList<Group> findByNameLike(Context context, String groupName, int offset, int limit) throws SQLException
context - The DSpace contextgroupName - Part of the group's name to search foroffset - Offset to use for pagination (-1 to disable)limit - The maximum number of results to return (-1 to disable)SQLException - if database errorint countByNameLike(Context context, String groupName) throws SQLException
context - The DSpace contextgroupName - Part of the group's name to search forSQLException - if database errorGroup findByIdAndMembership(Context context, UUID id, EPerson ePerson) throws SQLException
context - The DSpace contextid - The id of the group to look forePerson - The EPerson which has to be a memberSQLException - if database errorCopyright © 2022 LYRASIS. All rights reserved.