Package org.dspace.content.dao.impl
Class CollectionDAOImpl
- All Implemented Interfaces:
CollectionDAO,DSpaceObjectDAO<Collection>,DSpaceObjectLegacySupportDAO<Collection>,GenericDAO<Collection>
Hibernate implementation of the Database Access Object interface class for the Collection object.
This class is responsible for all database calls for the Collection object and is autowired by Spring.
This class should never be accessed directly.
- Author:
- kevinvandevelde at atmire.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintfindAll(Context context, MetadataField order) Get all collections in the system.findAll(Context context, MetadataField order, Integer limit, Integer offset) findAuthorized(Context context, EPerson ePerson, List<Integer> actions) findAuthorizedByGroup(Context context, EPerson ePerson, List<Integer> actions) findByGroup(Context context, Group group) findByTemplateItem(Context context, Item item) findCollectionsWithSubscribers(Context context) Methods inherited from class org.dspace.core.AbstractHibernateDSODAO
addMetadataLeftJoin, addMetadataSortQuery, addMetadataSortQuery, addMetadataValueWhereQuery, findByLegacyIdMethods inherited from class org.dspace.core.AbstractHibernateDAO
count, count, countLong, create, createQuery, createQuery, delete, executeCriteriaQuery, findAll, findAll, findByID, findByID, findByID, findByX, findMany, findMany, findUnique, getCriteriaBuilder, getCriteriaQuery, getHibernateSession, iterate, list, list, list, list, save, singleResult, singleResult, uniqueResult, uniqueResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dspace.content.dao.DSpaceObjectLegacySupportDAO
findByLegacyId
-
Constructor Details
-
CollectionDAOImpl
protected CollectionDAOImpl()
-
-
Method Details
-
findAll
Get all collections in the system. These are alphabetically sorted by collection name.- Specified by:
findAllin interfaceCollectionDAO- Parameters:
context- DSpace context objectorder- order by MetadataField- Returns:
- the collections in the system
- Throws:
SQLException- if database error
-
findAll
public List<Collection> findAll(Context context, MetadataField order, Integer limit, Integer offset) throws SQLException - Specified by:
findAllin interfaceCollectionDAO- Throws:
SQLException
-
findByTemplateItem
- Specified by:
findByTemplateItemin interfaceCollectionDAO- Throws:
SQLException
-
findByGroup
- Specified by:
findByGroupin interfaceCollectionDAO- Parameters:
context- DSpace Contextgroup- EPerson Group- Returns:
- the collection, if any, that has the specified group as administrators or submitters
- Throws:
SQLException
-
findAuthorized
public List<Collection> findAuthorized(Context context, EPerson ePerson, List<Integer> actions) throws SQLException - Specified by:
findAuthorizedin interfaceCollectionDAO- Throws:
SQLException
-
findAuthorizedByGroup
public List<Collection> findAuthorizedByGroup(Context context, EPerson ePerson, List<Integer> actions) throws SQLException - Specified by:
findAuthorizedByGroupin interfaceCollectionDAO- Throws:
SQLException
-
findCollectionsWithSubscribers
- Specified by:
findCollectionsWithSubscribersin interfaceCollectionDAO- Throws:
SQLException
-
countRows
- Specified by:
countRowsin interfaceCollectionDAO- Throws:
SQLException
-
getCollectionsWithBitstreamSizesTotal
public List<Map.Entry<Collection,Long>> getCollectionsWithBitstreamSizesTotal(Context context) throws SQLException - Specified by:
getCollectionsWithBitstreamSizesTotalin interfaceCollectionDAO- Throws:
SQLException
-