1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.api.service;
|
11
|
|
12
|
import java.util.List;
|
13
|
|
14
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
15
|
import eu.etaxonomy.cdm.model.agent.Person;
|
16
|
import eu.etaxonomy.cdm.model.common.Annotation;
|
17
|
import eu.etaxonomy.cdm.model.common.MarkerType;
|
18
|
import eu.etaxonomy.cdm.model.common.User;
|
19
|
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
|
20
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
21
|
|
22
|
public interface IAnnotationService extends IAnnotatableService<Annotation> {
|
23
|
/**
|
24
|
* return a count of the number of annotations made by this person, optionally filtered by the status of those annotations
|
25
|
*
|
26
|
* @param commentator the person who created those annotations
|
27
|
* @param status the status of those annotations (can be null)
|
28
|
* @return an integer
|
29
|
*/
|
30
|
public long count(Person commentator, MarkerType status);
|
31
|
|
32
|
/**
|
33
|
*
|
34
|
* @param commentator the person who created those annotations
|
35
|
* @param status the status of those annotations (can be null)
|
36
|
* @param pageSize The maximum number of annotations returned (can be null for all annotations)
|
37
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
38
|
* @param orderHints Properties to order by
|
39
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
|
40
|
* @return a paged list of Annotation instances
|
41
|
*/
|
42
|
public Pager<Annotation> list(Person commentator, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
43
|
|
44
|
/**
|
45
|
* return a count of the number of annotations created by this user, optionally filtered by the status of those annotations
|
46
|
*
|
47
|
* @param creator the user who created those annotations
|
48
|
* @param status the status of those annotations (can be null)
|
49
|
* @return an integer
|
50
|
*/
|
51
|
public long count(User creator, MarkerType status);
|
52
|
|
53
|
/**
|
54
|
*
|
55
|
* @param creator the user who created those annotations
|
56
|
* @param status the status of those annotations (can be null)
|
57
|
* @param pageSize The maximum number of annotations returned (can be null for all annotations)
|
58
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
59
|
* @param orderHints Properties to order by
|
60
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
|
61
|
* @return a paged list of Annotation instances
|
62
|
*/
|
63
|
public Pager<Annotation> list(User creator, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
64
|
|
65
|
}
|