public class GroupDAOImpl extends AbstractHibernateDSODAO<Group> implements GroupDAO
| Modifier | Constructor and Description |
|---|---|
protected |
GroupDAOImpl() |
| 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
|
void |
delete(Context context,
Group group) |
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
|
addMetadataLeftJoin, addMetadataSortQuery, addMetadataValueWhereQuery, findByLegacyIdcount, count, countLong, create, createCriteria, createCriteria, createQuery, findAll, findByID, findByID, findMany, findMany, findUnique, getHibernateSession, iterate, list, list, save, singleResult, uniqueResult, uniqueResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindByLegacyIdcreate, findAll, findByID, findByID, findMany, findUnique, savepublic List<Group> findByMetadataField(Context context, String searchValue, MetadataField metadataField) throws SQLException
GroupDAOfindByMetadataField in interface GroupDAOcontext - The DSpace contextsearchValue - The value to matchmetadataField - The metadata field to search inSQLExceptionpublic List<Group> findAll(Context context, List<MetadataField> sortMetadataFields) throws SQLException
GroupDAOfindAll in interface GroupDAOcontext - The DSpace contextsortMetadataFields - The metadata fields to sort onSQLExceptionpublic List<Group> findAll(Context context) throws SQLException
GroupDAOfindAll in interface GroupDAOcontext - The DSpace contextSQLExceptionpublic List<Group> findByEPerson(Context context, EPerson ePerson) throws SQLException
GroupDAOfindByEPerson in interface GroupDAOcontext - The DSpace contextePerson - The EPerson to matchSQLExceptionpublic Group findByName(Context context, String name) throws SQLException
GroupDAOfindByName in interface GroupDAOcontext - The DSpace contextname - The name of the group to look forSQLExceptionpublic Group findByNameAndEPerson(Context context, String groupName, EPerson ePerson) throws SQLException
GroupDAOfindByNameAndEPerson in interface GroupDAOcontext - The DSpace contextgroupName - The name of the group to look forePerson - The EPerson which has to be a memberSQLExceptionpublic List<Group> findByNameLike(Context context, String groupName, int offset, int limit) throws SQLException
GroupDAOfindByNameLike in interface GroupDAOcontext - 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)SQLExceptionpublic int countByNameLike(Context context, String groupName) throws SQLException
GroupDAOcountByNameLike in interface GroupDAOcontext - The DSpace contextgroupName - Part of the group's name to search forSQLExceptionpublic void delete(Context context, Group group) throws SQLException
delete in interface GenericDAO<Group>delete in class AbstractHibernateDAO<Group>SQLExceptionpublic List<org.apache.commons.lang3.tuple.Pair<UUID,UUID>> getGroup2GroupResults(Context context, boolean flushQueries) throws SQLException
GroupDAOgetGroup2GroupResults in interface GroupDAOcontext - The DSpace contextflushQueries - Flush all pending queriesSQLExceptionpublic List<Group> getEmptyGroups(Context context) throws SQLException
GroupDAOgetEmptyGroups in interface GroupDAOcontext - The DSpace contextSQLExceptionpublic int countRows(Context context) throws SQLException
GroupDAOcountRows in interface GroupDAOcontext - The DSpace contextSQLExceptionCopyright © 2016 DuraSpace. All Rights Reserved.