public class ChecksumHistoryServiceImpl extends Object implements ChecksumHistoryService
| Modifier and Type | Field and Description |
|---|---|
protected ChecksumHistoryDAO |
checksumHistoryDAO |
protected ChecksumResultService |
checksumResultService |
protected MostRecentChecksumService |
mostRecentChecksumService |
| Modifier | Constructor and Description |
|---|---|
protected |
ChecksumHistoryServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHistory(Context context,
MostRecentChecksum mostRecentChecksum) |
void |
deleteByBitstream(Context context,
Bitstream bitstream) |
int |
deleteByDateAndCode(Context context,
Date retentionDate,
ChecksumResultCode checksumResultCode)
Delete the history records from the database.
|
int |
prune(Context context,
Map<ChecksumResultCode,Long> interests)
Prune the history records from the database.
|
void |
updateMissingBitstreams(Context context) |
@Autowired(required=true) protected ChecksumHistoryDAO checksumHistoryDAO
@Autowired(required=true) protected MostRecentChecksumService mostRecentChecksumService
@Autowired(required=true) protected ChecksumResultService checksumResultService
public void updateMissingBitstreams(Context context) throws SQLException
updateMissingBitstreams in interface ChecksumHistoryServiceSQLExceptionpublic void addHistory(Context context, MostRecentChecksum mostRecentChecksum) throws SQLException
addHistory in interface ChecksumHistoryServiceSQLExceptionpublic int deleteByDateAndCode(Context context, Date retentionDate, ChecksumResultCode checksumResultCode) throws SQLException
deleteByDateAndCode in interface ChecksumHistoryServicecontext - ContextretentionDate - any records older than this data are deleted.checksumResultCode - result code records must have for them to be deleted.SQLException - if database error occurs.public void deleteByBitstream(Context context, Bitstream bitstream) throws SQLException
deleteByBitstream in interface ChecksumHistoryServiceSQLExceptionpublic int prune(Context context, Map<ChecksumResultCode,Long> interests) throws SQLException
ChecksumHistoryServiceprune in interface ChecksumHistoryServicecontext - contextinterests - set of results and the duration of time before they are
removed from the databaseSQLException - if database errorCopyright © 2017 DuraSpace. All rights reserved.