Package org.dspace.handle.dao.impl
Class HandleDAOImpl
- java.lang.Object
-
- org.dspace.core.AbstractHibernateDAO<Handle>
-
- org.dspace.handle.dao.impl.HandleDAOImpl
-
- All Implemented Interfaces:
GenericDAO<Handle>,HandleDAO
public class HandleDAOImpl extends AbstractHibernateDAO<Handle> implements 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 Modifier Constructor Description protectedHandleDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcountHandlesByPrefix(Context context, String prefix)intcountRows(Context context)HandlefindByHandle(Context context, String handle)List<Handle>findByPrefix(Context context, String prefix)List<Handle>getHandlesByDSpaceObject(Context context, DSpaceObject dso)LonggetNextHandleSuffix(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, 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.core.GenericDAO
create, delete, findAll, findAll, findByID, findByID, findMany, findUnique, save
-
-
-
-
Method Detail
-
getHandlesByDSpaceObject
public List<Handle> getHandlesByDSpaceObject(Context context, DSpaceObject dso) throws SQLException
- Specified by:
getHandlesByDSpaceObjectin interfaceHandleDAO- Throws:
SQLException
-
findByHandle
public Handle findByHandle(Context context, String handle) throws SQLException
- Specified by:
findByHandlein interfaceHandleDAO- Throws:
SQLException
-
findByPrefix
public List<Handle> findByPrefix(Context context, String prefix) throws SQLException
- Specified by:
findByPrefixin interfaceHandleDAO- Throws:
SQLException
-
countHandlesByPrefix
public long countHandlesByPrefix(Context context, String prefix) throws SQLException
- 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
public int countRows(Context context) throws SQLException
- Specified by:
countRowsin interfaceHandleDAO- Throws:
SQLException
-
getNextHandleSuffix
public Long getNextHandleSuffix(Context context) throws SQLException
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
-
-