1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2007 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
|
11
|
package eu.etaxonomy.cdm.api.service;
|
12
|
|
13
|
import java.util.UUID;
|
14
|
|
15
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
16
|
import eu.etaxonomy.cdm.model.view.AuditEvent;
|
17
|
import eu.etaxonomy.cdm.persistence.dao.common.AuditEventSort;
|
18
|
|
19
|
public interface IAuditEventService {
|
20
|
|
21
|
/**
|
22
|
* Returns a paged sublist of AuditEvent instances stored in the database.
|
23
|
* A maximum of 'limit' objects are returned, starting at object with index 'start'.
|
24
|
*
|
25
|
* @param limit the maximum number of entities returned (can be null to return all entities)
|
26
|
* @param start
|
27
|
* @param sort Whether the list is sorted going forward in time (AuditEventSort.FORWARDS)
|
28
|
* or backwards (AuditEventSort.BACKWARDS)
|
29
|
* @return a Pager containing AuditEvent instances
|
30
|
*/
|
31
|
public Pager<AuditEvent> list(Integer limit, Integer start,AuditEventSort sort);
|
32
|
|
33
|
/**
|
34
|
* Find the AuditEvent with an identifier equal to the parameter
|
35
|
*
|
36
|
* @param id
|
37
|
* @return an AuditEvent, or null if there is no AuditEvent with that identifier
|
38
|
*/
|
39
|
public AuditEvent find(Integer Id);
|
40
|
|
41
|
/**
|
42
|
* Find the AuditEvent with a uuid (surrogate key) equal to the uuid supplied
|
43
|
*
|
44
|
* @param uuid
|
45
|
* @return an AuditEvent, or null if there is no AuditEvent with a uuid which matches
|
46
|
*/
|
47
|
public AuditEvent find(UUID uuid);
|
48
|
|
49
|
/**
|
50
|
* Checks whether an AuditEvent with a matching uuid exists in the database
|
51
|
*
|
52
|
* @param uuid
|
53
|
* @return true if an AuditEvent with a matching uuid exists in the database, false otherwise
|
54
|
*/
|
55
|
public boolean exists(UUID uuid);
|
56
|
|
57
|
/**
|
58
|
* Returns the AuditEvent immediately proceeding the audit event passed as an argument
|
59
|
*
|
60
|
* @param auditEvent
|
61
|
* @return the AuditEvent immediately proceeding, or null if the AuditEvent passed is
|
62
|
* the most recent event
|
63
|
*/
|
64
|
public AuditEvent getNextAuditEvent(AuditEvent auditEvent);
|
65
|
|
66
|
/**
|
67
|
* Returns the AuditEvent immediately preceding the audit event passed as an argument
|
68
|
*
|
69
|
* @param auditEvent
|
70
|
* @return the AuditEvent immediately preceding, or null if the AuditEvent passed is
|
71
|
* the first event in the database
|
72
|
*/
|
73
|
public AuditEvent getPreviousAuditEvent(AuditEvent auditEvent);
|
74
|
}
|