Package org.dspace.content.dao.impl
Class CollectionDAOImpl
- java.lang.Object
-
- org.dspace.core.AbstractHibernateDAO<T>
-
- org.dspace.core.AbstractHibernateDSODAO<Collection>
-
- org.dspace.content.dao.impl.CollectionDAOImpl
-
- All Implemented Interfaces:
CollectionDAO,DSpaceObjectDAO<Collection>,DSpaceObjectLegacySupportDAO<Collection>,GenericDAO<Collection>
public class CollectionDAOImpl extends AbstractHibernateDSODAO<Collection> implements CollectionDAO
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 Modifier Constructor Description protectedCollectionDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountRows(Context context)List<Collection>findAll(Context context, MetadataField order)Get all collections in the system.List<Collection>findAll(Context context, MetadataField order, Integer limit, Integer offset)List<Collection>findAuthorized(Context context, EPerson ePerson, List<Integer> actions)List<Collection>findAuthorizedByGroup(Context context, EPerson ePerson, List<Integer> actions)CollectionfindByGroup(Context context, Group group)CollectionfindByTemplateItem(Context context, Item item)List<Collection>findCollectionsWithSubscribers(Context context)List<Map.Entry<Collection,Long>>getCollectionsWithBitstreamSizesTotal(Context context)-
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, 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<Collection> findAll(Context context, MetadataField order) throws SQLException
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
public Collection findByTemplateItem(Context context, Item item) throws SQLException
- Specified by:
findByTemplateItemin interfaceCollectionDAO- Throws:
SQLException
-
findByGroup
public Collection findByGroup(Context context, Group group) throws SQLException
- 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
public List<Collection> findCollectionsWithSubscribers(Context context) throws SQLException
- Specified by:
findCollectionsWithSubscribersin interfaceCollectionDAO- Throws:
SQLException
-
countRows
public int countRows(Context context) throws SQLException
- Specified by:
countRowsin interfaceCollectionDAO- Throws:
SQLException
-
getCollectionsWithBitstreamSizesTotal
public List<Map.Entry<Collection,Long>> getCollectionsWithBitstreamSizesTotal(Context context) throws SQLException
- Specified by:
getCollectionsWithBitstreamSizesTotalin interfaceCollectionDAO- Throws:
SQLException
-
-