1
|
package eu.etaxonomy.cdm.api.service;
|
2
|
|
3
|
import java.util.List;
|
4
|
|
5
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
6
|
import eu.etaxonomy.cdm.model.common.Marker;
|
7
|
import eu.etaxonomy.cdm.model.common.MarkerType;
|
8
|
import eu.etaxonomy.cdm.model.permission.User;
|
9
|
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
|
10
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
11
|
|
12
|
public interface IMarkerService extends IVersionableService<Marker> {
|
13
|
|
14
|
/**
|
15
|
* Returns a pager of markers which have the same type
|
16
|
*
|
17
|
* @param markerType The type of markerType
|
18
|
* @param pageSize The maximum number of markers returned (can be null for all markers)
|
19
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
20
|
* @param orderHints may be null
|
21
|
* @param propertyPaths properties to initialize - see {@link IBeanInitializer#initialize(Object, List)}
|
22
|
* @return
|
23
|
*/
|
24
|
public Pager<Marker> page(MarkerType markerType, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
25
|
|
26
|
/**
|
27
|
*
|
28
|
* @param creator the person who created those markers
|
29
|
* @param markerType the markerType of those markers (can be null)
|
30
|
* @param pageSize The maximum number of markers returned (can be null for all markers)
|
31
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
32
|
* @param orderHints Properties to order by
|
33
|
* @param propertyPaths Properties to initialize in the returned entities, following the syntax described in {@link IBeanInitializer#initialize(Object, List)}
|
34
|
* @return a paged list of Marker instances
|
35
|
*/
|
36
|
public Pager<Marker> list(User creator, MarkerType markerType, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
|
37
|
|
38
|
/**
|
39
|
*
|
40
|
* @param creator the person who created those markers
|
41
|
* @param markerType the markerType of those markers (can be null)
|
42
|
* @return
|
43
|
*/
|
44
|
public long count(User creator, MarkerType markerType);
|
45
|
|
46
|
}
|