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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteByBitstream(Context context, Bitstream bitstream) Delete all ChecksumHistory rows for the given Bitstream.intdeleteByDateAndCode(Context context, Instant 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, 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
-
ChecksumHistoryDAOImpl
protected ChecksumHistoryDAOImpl()
-
-
Method Details
-
deleteByDateAndCode
public int deleteByDateAndCode(Context context, Instant 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
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
-