1 package eu
.etaxonomy
.cdm
.persistence
.view
;
6 import eu
.etaxonomy
.cdm
.model
.view
.AuditEvent
;
7 import eu
.etaxonomy
.cdm
.persistence
.dao
.common
.AuditEventSort
;
10 public interface IAuditEventDao
{
13 * Find the AuditEvent with an identifier equal to the parameter
16 * @return an AuditEvent, or null if there is no AuditEvent with that identifier
18 public AuditEvent
findById(Integer id
);
21 * Find the AuditEvent with a uuid (surrogate key) equal to the uuid supplied
24 * @return an AuditEvent, or null if there is no AuditEvent with a uuid which matches
26 public AuditEvent
findByUuid(UUID uuid
);
29 * Count the AuditEvents in this database
31 * @return the total number of AuditEvents in this database
36 * Returns a sublist of AuditEvent instances stored in the database.
37 * A maximum of 'limit' objects are returned, starting at object with index 'start'.
39 * @param limit the maximum number of entities returned (can be null to return all entities)
41 * @param sort Whether the list is sorted going forward in time (AuditEventSort.FORWARDS)
42 * or backwards (AuditEventSort.BACKWARDS)
43 * @return a List of AuditEvent instances
45 public List
<AuditEvent
> list(Integer limit
, Integer start
,AuditEventSort sort
);
48 * Returns the AuditEvent immediately proceeding the audit event passed as an argument
51 * @return the AuditEvent immediately proceeding, or null if the AuditEvent passed is
52 * the most recent event
54 public AuditEvent
getNextAuditEvent(AuditEvent auditEvent
);
57 * Returns the AuditEvent immediately preceding the audit event passed as an argument
60 * @return the AuditEvent immediately preceding, or null if the AuditEvent passed is
61 * the first event in the database
63 public AuditEvent
getPreviousAuditEvent(AuditEvent auditEvent
);
66 * Checks whether an AuditEvent with a matching uuid exists in the database
69 * @return true if an AuditEvent with a matching uuid exists in the database, false otherwise
71 public boolean exists(UUID uuid
);