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
|
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)
|
Group |
findByNameAndEPerson(Context context,
String groupName,
EPerson ePerson)
Find a group by its name and the membership of the given EPerson
|
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 inSQLExceptionList<Group> findAll(Context context, List<MetadataField> sortMetadataFields) throws SQLException
context - The DSpace contextsortMetadataFields - The metadata fields to sort onSQLExceptionList<Group> findAll(Context context) throws SQLException
context - The DSpace contextSQLExceptionList<Group> findByEPerson(Context context, EPerson ePerson) throws SQLException
context - The DSpace contextePerson - The EPerson to matchSQLExceptionList<org.apache.commons.lang3.tuple.Pair<UUID,UUID>> getGroup2GroupResults(Context context, boolean flushQueries) throws SQLException
context - The DSpace contextflushQueries - Flush all pending queriesSQLExceptionList<Group> getEmptyGroups(Context context) throws SQLException
context - The DSpace contextSQLExceptionint countRows(Context context) throws SQLException
context - The DSpace contextSQLExceptionGroup findByName(Context context, String name) throws SQLException
context - The DSpace contextname - The name of the group to look forSQLExceptionList<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)SQLExceptionint countByNameLike(Context context, String groupName) throws SQLException
context - The DSpace contextgroupName - Part of the group's name to search forSQLExceptionGroup findByNameAndEPerson(Context context, String groupName, EPerson ePerson) throws SQLException
context - The DSpace contextgroupName - The name of the group to look forePerson - The EPerson which has to be a memberSQLExceptionCopyright © 2016 DuraSpace. All Rights Reserved.