Package org.dspace.handle.dao.impl
Class HandleDAOImpl
- All Implemented Interfaces:
GenericDAO<Handle>,HandleDAO
Hibernate implementation of the Database Access Object interface class for the Handle object.
This class is responsible for all database calls for the Handle 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 TypeMethodDescriptionlongcountHandlesByPrefix(Context context, String prefix) intfindByHandle(Context context, String handle) findByPrefix(Context context, String prefix) getHandlesByDSpaceObject(Context context, DSpaceObject dso) getNextHandleSuffix(Context context) Return next available value of Handle suffix (based on DB sequence).intupdateHandlesWithNewPrefix(Context context, String newPrefix, String oldPrefix) Methods 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, uniqueResult
-
Constructor Details
-
HandleDAOImpl
protected HandleDAOImpl()
-
-
Method Details
-
getHandlesByDSpaceObject
- Specified by:
getHandlesByDSpaceObjectin interfaceHandleDAO- Throws:
SQLException
-
findByHandle
- Specified by:
findByHandlein interfaceHandleDAO- Throws:
SQLException
-
findByPrefix
- Specified by:
findByPrefixin interfaceHandleDAO- Throws:
SQLException
-
countHandlesByPrefix
- Specified by:
countHandlesByPrefixin interfaceHandleDAO- Throws:
SQLException
-
updateHandlesWithNewPrefix
public int updateHandlesWithNewPrefix(Context context, String newPrefix, String oldPrefix) throws SQLException - Specified by:
updateHandlesWithNewPrefixin interfaceHandleDAO- Throws:
SQLException
-
countRows
- Specified by:
countRowsin interfaceHandleDAO- Throws:
SQLException
-
getNextHandleSuffix
Return next available value of Handle suffix (based on DB sequence).- Specified by:
getNextHandleSuffixin interfaceHandleDAO- Parameters:
context- Current DSpace Context- Returns:
- next available Handle suffix (as a Long)
- Throws:
SQLException- if database error or sequence doesn't exist
-