public class ChecksumHistoryDAO extends DAOSupport
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.
| Constructor and Description |
|---|
ChecksumHistoryDAO() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
deleteHistoryByDateAndCode(java.util.Date retentionDate,
java.lang.String result,
java.sql.Connection conn)
Delete the history records from the database.
|
protected int |
deleteHistoryForBitstreamInfo(int id,
java.sql.Connection conn)
Deletes the bitstream from the bitstream_history table if it exist.
|
void |
insertHistory(BitstreamInfo info)
Inserts results of checksum check into checksum_history table for a given
bitstream.
|
int |
prune(java.util.Map<java.lang.String,java.lang.Long> interests)
Prune the history records from the database.
|
protected void |
updateMissingBitstreams(java.sql.Connection conn) |
cleanup, cleanup, cleanup, cleanuppublic void insertHistory(BitstreamInfo info)
info - the BitstreamInfo representing a checksum check.java.lang.IllegalArgumentException - if the BitstreamInfo is null.protected int deleteHistoryForBitstreamInfo(int id,
java.sql.Connection conn)
id - the bitstream id.protected void updateMissingBitstreams(java.sql.Connection conn)
throws java.sql.SQLException
conn - java.sql.SQLExceptionprotected int deleteHistoryByDateAndCode(java.util.Date retentionDate,
java.lang.String result,
java.sql.Connection conn)
throws java.sql.SQLException
retentionDate - any records older than this data are deleted.result - result code records must have for them to be deleted.conn - database connection.java.sql.SQLException - if database error occurs.public int prune(java.util.Map<java.lang.String,java.lang.Long> interests)
interests - set of results and the duration of time before they are
removed from the databaseCopyright © 2018 DuraSpace. All Rights Reserved.