Project

General

Profile

« Previous | Next » 

Revision a784f00f

Added by Katja Luther about 14 years ago

merge cate-development2 branch with trunk

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IAnnotatableService.java
14 14
import eu.etaxonomy.cdm.api.service.pager.Pager;
15 15
import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
16 16
import eu.etaxonomy.cdm.model.common.Annotation;
17
import eu.etaxonomy.cdm.model.common.Marker;
17 18
import eu.etaxonomy.cdm.model.common.MarkerType;
18 19
import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;
19 20
import eu.etaxonomy.cdm.persistence.query.OrderHint;
......
33 34
	 * @return a Pager of Annotation entities
34 35
	 */
35 36
	public Pager<Annotation> getAnnotations(T annotatedObj, MarkerType status, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
37
	
38
	/**
39
	 * Returns a Pager containing Marker entities belonging to the object supplied, optionally filtered by
40
	 * whether they are technical or non-technical markers
41
	 * 
42
	 * @param annotatableEntity the entity which is marked
43
	 * @param technical The type of MarkerTypes to consider (null to count all markers, regardless of whether the makerType is technical or not)
44
	 * @param pageSize The maximum number of markers returned (can be null for all markers)
45
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
46
	 * @param orderHints may be null
47
	 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
48
	 * @return a List of Marker instances
49
	 */
50
	public Pager<Marker> getMarkers(T annotatableEntity, Boolean technical, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
51
	
52
	/**
53
	 * Returns a list of arrays representing counts of entities of type clazz, grouped by their markerTypes. The arrays have two elements. 
54
	 * The first element is the MarkerType, initialized using the propertyPaths parameter. The second element is the count of all markers of Objects
55
	 * of type clazz with that MarkerType. The boolean technical can be used to choose only technical or only non-technical marker types. The list is sorted by
56
	 * titleCache of the markerType, in ascending order.
57
	 * 
58
	 * @param clazz optionally restrict the markers to those belonging to this class
59
	 * @param technical The type of MarkerTypes to consider (null to count all markers, regardless of whether the makerType is technical or not)
60
	 * @param pageSize The maximum number of arrays returned (can be null for all arrays)
61
	 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
62
	 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
63
	 * @return
64
	 */
65
	public List<Object[]> groupMarkers(Class<? extends T> clazz, Boolean technical, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
66
	
67
	/**
68
	 * returns a count of all markers belonging to that clazz, optionally filtered to include only technical or only non-technical markers.
69
	 * 
70
	 * @param clazz optionally restrict the markers to those belonging to this class
71
	 * @param technical The type of MarkerTypes to consider (null to count all markers, regardless of whether the makerType is technical or not)
72
	 * @return a count of markers
73
	 */
74
	public int countMarkers(Class<? extends T> clazz, Boolean technical);
36 75
} 

Also available in: Unified diff