Package org.dspace.content.dao.impl
Class CommunityDAOImpl
- java.lang.Object
-
- org.dspace.core.AbstractHibernateDAO<T>
-
- org.dspace.core.AbstractHibernateDSODAO<Community>
-
- org.dspace.content.dao.impl.CommunityDAOImpl
-
- All Implemented Interfaces:
CommunityDAO,DSpaceObjectDAO<Community>,DSpaceObjectLegacySupportDAO<Community>,GenericDAO<Community>
public class CommunityDAOImpl extends AbstractHibernateDSODAO<Community> implements CommunityDAO
Hibernate implementation of the Database Access Object interface class for the Community object. This class is responsible for all database calls for the Community object and is autowired by spring This class should never be accessed directly.- Author:
- kevinvandevelde at atmire.com
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCommunityDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountRows(Context context)List<Community>findAll(Context context, MetadataField sortField)Get a list of all communities in the system.List<Community>findAll(Context context, MetadataField sortField, Integer limit, Integer offset)List<Community>findAllNoParent(Context context, MetadataField sortField)List<Community>findAuthorized(Context context, EPerson ePerson, List<Integer> actions)List<Community>findAuthorizedByGroup(Context context, EPerson ePerson, List<Integer> actions)CommunityfindByAdminGroup(Context context, Group group)-
Methods inherited from class org.dspace.core.AbstractHibernateDSODAO
addMetadataLeftJoin, addMetadataSortQuery, addMetadataSortQuery, addMetadataValueWhereQuery, findByLegacyId
-
Methods inherited from class org.dspace.core.AbstractHibernateDAO
count, count, countLong, create, createQuery, delete, executeCriteriaQuery, findAll, findAll, findByID, findByID, findByX, findMany, findMany, findUnique, getCriteriaBuilder, getCriteriaQuery, getHibernateSession, iterate, list, list, list, save, singleResult, singleResult, uniqueResult, uniqueResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.dspace.content.dao.DSpaceObjectLegacySupportDAO
findByLegacyId
-
Methods inherited from interface org.dspace.core.GenericDAO
create, delete, findAll, findAll, findByID, findByID, findMany, findUnique, save
-
-
-
-
Method Detail
-
findAll
public List<Community> findAll(Context context, MetadataField sortField) throws SQLException
Get a list of all communities in the system. These are alphabetically sorted by community name.- Specified by:
findAllin interfaceCommunityDAO- Parameters:
context- DSpace context objectsortField- sort field- Returns:
- the communities in the system
- Throws:
SQLException- if database error
-
findAll
public List<Community> findAll(Context context, MetadataField sortField, Integer limit, Integer offset) throws SQLException
- Specified by:
findAllin interfaceCommunityDAO- Throws:
SQLException
-
findByAdminGroup
public Community findByAdminGroup(Context context, Group group) throws SQLException
- Specified by:
findByAdminGroupin interfaceCommunityDAO- Throws:
SQLException
-
findAllNoParent
public List<Community> findAllNoParent(Context context, MetadataField sortField) throws SQLException
- Specified by:
findAllNoParentin interfaceCommunityDAO- Throws:
SQLException
-
findAuthorized
public List<Community> findAuthorized(Context context, EPerson ePerson, List<Integer> actions) throws SQLException
- Specified by:
findAuthorizedin interfaceCommunityDAO- Throws:
SQLException
-
findAuthorizedByGroup
public List<Community> findAuthorizedByGroup(Context context, EPerson ePerson, List<Integer> actions) throws SQLException
- Specified by:
findAuthorizedByGroupin interfaceCommunityDAO- Throws:
SQLException
-
countRows
public int countRows(Context context) throws SQLException
- Specified by:
countRowsin interfaceCommunityDAO- Throws:
SQLException
-
-