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.List;
|
14
|
|
15
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
16
|
import eu.etaxonomy.cdm.model.agent.Person;
|
17
|
import eu.etaxonomy.cdm.model.common.Annotation;
|
18
|
import eu.etaxonomy.cdm.model.common.MarkerType;
|
19
|
import eu.etaxonomy.cdm.model.common.User;
|
20
|
import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;
|
21
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
22
|
|
23
|
public interface IAnnotationService extends IAnnotatableService<Annotation> {
|
24
|
/**
|
25
|
* return a count of the number of annotations made by this person, optionally filtered by the status of those annotations
|
26
|
*
|
27
|
* @param commentator the person who created those annotations
|
28
|
* @param status the status of those annotations (can be null)
|
29
|
* @return an integer
|
30
|
*/
|
31
|
public int count(Person commentator, MarkerType status);
|
32
|
|
33
|
/**
|
34
|
*
|
35
|
* @param commentator the person who created those annotations
|
36
|
* @param status the status of those annotations (can be null)
|
37
|
* @param pageSize The maximum number of annotations returned (can be null for all annotations)
|
38
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
39
|
* @param orderHints Properties to order by
|
40
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link BeanInitializer#initialize(Object, List)}
|
41
|
* @return a paged list of Annotation instances
|
42
|
*/
|
43
|
public Pager<Annotation> list(Person commentator, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
44
|
|
45
|
/**
|
46
|
* return a count of the number of annotations created by this user, optionally filtered by the status of those annotations
|
47
|
*
|
48
|
* @param creator the user who created those annotations
|
49
|
* @param status the status of those annotations (can be null)
|
50
|
* @return an integer
|
51
|
*/
|
52
|
public int count(User creator, MarkerType status);
|
53
|
|
54
|
/**
|
55
|
*
|
56
|
* @param creator the user who created those annotations
|
57
|
* @param status the status of those annotations (can be null)
|
58
|
* @param pageSize The maximum number of annotations returned (can be null for all annotations)
|
59
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
60
|
* @param orderHints Properties to order by
|
61
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link BeanInitializer#initialize(Object, List)}
|
62
|
* @return a paged list of Annotation instances
|
63
|
*/
|
64
|
public Pager<Annotation> list(User creator, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
65
|
|
66
|
}
|