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 Details

    • ChecksumHistoryDAOImpl

      protected ChecksumHistoryDAOImpl()
  • Method Details

    • deleteByDateAndCode

      public int deleteByDateAndCode(Context context, Instant retentionDate, ChecksumResultCode resultCode) throws SQLException
      Description copied from interface: ChecksumHistoryDAO
      Delete all ChecksumHistory rows with retention date before the given and the specified result code.
      Specified by:
      deleteByDateAndCode in interface ChecksumHistoryDAO
      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: ChecksumHistoryDAO
      Delete all ChecksumHistory rows for the given Bitstream.
      Specified by:
      deleteByBitstream in interface ChecksumHistoryDAO
      Parameters:
      context - The relevant DSpace Context.
      bitstream - which bitstream's checksums to delete
      Throws:
      SQLException - if database error