Revision f37ac392
Added by Ben Clark over 15 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/common/IAnnotatableDao.java | ||
---|---|---|
9 | 9 |
|
10 | 10 |
package eu.etaxonomy.cdm.persistence.dao.common; |
11 | 11 |
|
12 |
import java.util.List; |
|
13 |
|
|
12 | 14 |
import eu.etaxonomy.cdm.model.common.AnnotatableEntity; |
15 |
import eu.etaxonomy.cdm.model.common.Annotation; |
|
16 |
import eu.etaxonomy.cdm.model.common.MarkerType; |
|
13 | 17 |
|
14 | 18 |
/** |
15 | 19 |
* @author n.hoffmann |
... | ... | |
17 | 21 |
* @version 1.0 |
18 | 22 |
*/ |
19 | 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); |
|
20 | 44 |
} |
Also available in: Unified diff
Added IAnnotationDao & implementation, and IAnnotatableDao & implementation, as part of #466