class ChecksumHistoryDAOImpl extends AbstractHibernateDAO<ChecksumHistory> implements ChecksumHistoryDAO {

    @Override
    public int deleteByDateAndCode(Context context, Date retentionDate, ChecksumResultCode resultCode) throws SQLException {
        String hql = "delete from ChecksumHistory where processEndDate < :processEndDate AND checksumResult.resultCode=:resultCode";
        Query query = createQuery(context, hql);
        query.setTimestamp("processEndDate", retentionDate);
        query.setParameter("resultCode", resultCode);
        return query.executeUpdate();
    }

    protected  ChecksumHistoryDAOImpl();

}