01fd53fb5809086de7186acaf1be35d7dd5c3033
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / persistence / dao / common / IAnnotatableDao.java
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.persistence.dao.common;
11
12 import java.util.List;
13
14 import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
15 import eu.etaxonomy.cdm.model.common.Annotation;
16 import eu.etaxonomy.cdm.model.common.MarkerType;
17
18 /**
19 * @author n.hoffmann
20 * @created 24.09.2008
21 * @version 1.0
22 */
23 public interface IAnnotatableDao<T extends AnnotatableEntity> extends ICdmEntityDao<T>{
24
25 /**
26 * Returns a List of Annotations belonging to the supplied AnnotatableEntity
27 *
28 * @param annotatableEntity the entity which is annotated
29 * @param status The status of the annotations (null to return annotations regardless of status)
30 * @param pageSize The maximum number of annotations returned (can be null for all annotations)
31 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
32 * @return a List of Annotation instances
33 */
34 public List<Annotation> getAnnotations(T annotatableEntity, MarkerType status, Integer pageSize, Integer pageNumber);
35
36 /**
37 * Returns a count of Annotations belonging to the supplied AnnotatableEntity
38 *
39 * @param annotatableEntity the entity which is annotated
40 * @param status The status of the annotations (null to count all annotations regardless of status)
41 * @return a count of Annotation instances
42 */
43 public int countAnnotations(T annotatableEntity, MarkerType status);
44 }