Project

General

Profile

Download (3.32 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2008 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*/
6

    
7
package eu.etaxonomy.cdm.persistence.dao.common;
8

    
9
import java.util.List;
10

    
11
import eu.etaxonomy.cdm.model.agent.Person;
12
import eu.etaxonomy.cdm.model.common.Annotation;
13
import eu.etaxonomy.cdm.model.common.MarkerType;
14
import eu.etaxonomy.cdm.model.permission.User;
15
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
16
import eu.etaxonomy.cdm.persistence.query.OrderHint;
17

    
18
/**
19
 * @author a.babadshanjan
20
 * @since 12.09.2008
21
 */
22
public interface IAnnotationDao extends ILanguageStringBaseDao<Annotation> {
23

    
24
	/**
25
	 * Returns a count of Annotations, optionally filtered by commentator and status
26
	 *
27
	 * @param commentator The person who made the annotation (null to count all annotations, regardless of who made the comment)
28
	 * @param status The status of the annotations (null to count all annotations regardless of status)
29
	 * @return a count of Annotation instances
30
	 */
31
    public long count(Person commentator, MarkerType status);
32

    
33
    /**
34
	 * Returns a List of Annotations, optionally filtered by commentator and status
35
	 *
36
	 * @param commentator The person who made the annotation (null to list all annotations, regardless of who made the comment)
37
	 * @param status The status of the annotations (null to return annotations regardless of status)
38
	 * @param pageSize The maximum number of annotations returned (can be null for all annotations)
39
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
40
	 * @param orderHints Properties to order by
41
	 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
42
	 * @return a List of Annotation instances
43
	 */
44
	public List<Annotation> list(Person commentator, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
45

    
46
	/**
47
	 * Returns a count of Annotations, optionally filtered by creator and status
48
	 *
49
	 * @param commentator The user that created the annotation (null to count all annotations, regardless of who made the comment)
50
	 * @param status The status of the annotations (null to count all annotations regardless of status)
51
	 * @return a count of Annotation instances
52
	 */
53
    public long count(User creator, MarkerType status);
54

    
55
    /**
56
	 * Returns a List of Annotations, optionally filtered by creator and status
57
	 *
58
	 * @param commentator The user that created the annotation (null to list all annotations, regardless of who made the comment)
59
	 * @param status The status of the annotations (null to return annotations regardless of status)
60
	 * @param pageSize The maximum number of annotations returned (can be null for all annotations)
61
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
62
	 * @param orderHints Properties to order by
63
	 * @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
64
	 * @return a List of Annotation instances
65
	 */
66
	public List<Annotation> list(User creator, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
67
}
(3-3/21)