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