Package org.dspace.checker.dao.impl
Class ChecksumHistoryDAOImpl
- java.lang.Object
-
- org.dspace.core.AbstractHibernateDAO<ChecksumHistory>
-
- org.dspace.checker.dao.impl.ChecksumHistoryDAOImpl
-
- All Implemented Interfaces:
ChecksumHistoryDAO,GenericDAO<ChecksumHistory>
public class ChecksumHistoryDAOImpl extends AbstractHibernateDAO<ChecksumHistory> implements ChecksumHistoryDAO
This is the data access for the checksum history information. All update,insert and delete database operations should go through this class for checksum history operations.
- Author:
- Jim Downing, Grace Carpenter, Nathan Sarr, kevinvandevelde at atmire.com
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedChecksumHistoryDAOImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteByBitstream(Context context, Bitstream bitstream)Delete all ChecksumHistory rows for the given Bitstream.intdeleteByDateAndCode(Context context, Date retentionDate, ChecksumResultCode resultCode)Delete all ChecksumHistory rows with retention date before the given and the specified result code.-
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.core.GenericDAO
create, delete, findAll, findAll, findByID, findByID, findMany, findUnique, save
-
-
-
-
Method Detail
-
deleteByDateAndCode
public int deleteByDateAndCode(Context context, Date retentionDate, ChecksumResultCode resultCode) throws SQLException
Description copied from interface:ChecksumHistoryDAODelete all ChecksumHistory rows with retention date before the given and the specified result code.- Specified by:
deleteByDateAndCodein interfaceChecksumHistoryDAO- Parameters:
context- The relevant DSpace Context.retentionDate- row must be older than this to be deleted.resultCode- row must have this result to be deleted.- Returns:
- number of rows deleted.
- Throws:
SQLException- if database error
-
deleteByBitstream
public void deleteByBitstream(Context context, Bitstream bitstream) throws SQLException
Description copied from interface:ChecksumHistoryDAODelete all ChecksumHistory rows for the given Bitstream.- Specified by:
deleteByBitstreamin interfaceChecksumHistoryDAO- Parameters:
context- The relevant DSpace Context.bitstream- which bitstream's checksums to delete- Throws:
SQLException- if database error
-
-