1
|
/**
|
2
|
* Copyright (C) 2017 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
|
package eu.etaxonomy.cdm.api.service;
|
10
|
|
11
|
import java.util.Collection;
|
12
|
import java.util.List;
|
13
|
import java.util.Optional;
|
14
|
|
15
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
16
|
import eu.etaxonomy.cdm.model.common.User;
|
17
|
import eu.etaxonomy.cdm.model.name.Registration;
|
18
|
import eu.etaxonomy.cdm.model.name.RegistrationStatus;
|
19
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
20
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
21
|
|
22
|
/**
|
23
|
* @author a.kohlbecker
|
24
|
* @since May 2, 2017
|
25
|
*
|
26
|
*/
|
27
|
public interface IRegistrationService extends IAnnotatableService<Registration> {
|
28
|
|
29
|
/**
|
30
|
* Returns a sublist of Registration instances stored in the database. A maximum
|
31
|
* of 'limit' objects are returned, starting at object with index 'start'.
|
32
|
* The bean properties specified by the parameter <code>propertyPaths</code>
|
33
|
* and recursively initialized for each of the entities in the resultset
|
34
|
*
|
35
|
* For detailed description and examples regarding
|
36
|
* <code>propertyPaths</code> <b>please refer to:</b>
|
37
|
* {@link IBeanInitializer#initialize(Object, List)}
|
38
|
*
|
39
|
* @param pageSize The maximum number of objects returned (can be null for all matching objects)
|
40
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based,
|
41
|
* can be null, equivalent of starting at the beginning of the recordset)
|
42
|
* @param reference
|
43
|
* filters the Registration by the reference of the nomenclatural act for which the
|
44
|
* Registration as been created. The name and all type designations associated with
|
45
|
* the Registration are sharing the same citation.
|
46
|
* If the Optional itself is <code>null</code> the parameter is neglected.
|
47
|
* If Optional contains the value <code>null</code> all registrations with a name
|
48
|
* or type designation that has no reference are returned.
|
49
|
* Also those registrations having no name and type designation at all.
|
50
|
* @param includedStatus
|
51
|
* filters the Registration by the RegistrationStatus. Only Registration having one of the
|
52
|
* supplied status will included.
|
53
|
// * @param orderHints
|
54
|
// * Supports path like <code>orderHints.propertyNames</code> which
|
55
|
// * include *-to-one properties like createdBy.username or
|
56
|
// * authorTeam.persistentTitleCache
|
57
|
* @param propertyPaths
|
58
|
* @return
|
59
|
* @throws DataAccessException
|
60
|
*/
|
61
|
public Pager<Registration> page(Optional<Reference> reference, Collection<RegistrationStatus> includedStatus,
|
62
|
Integer pageSize, Integer pageIndex, List<String> propertyPaths);
|
63
|
|
64
|
/**
|
65
|
* Returns a sublist of Registration instances stored in the database. A maximum
|
66
|
* of 'limit' objects are returned, starting at object with index 'start'.
|
67
|
* The bean properties specified by the parameter <code>propertyPaths</code>
|
68
|
* and recursively initialized for each of the entities in the resultset
|
69
|
*
|
70
|
* For detailed description and examples regarding
|
71
|
* <code>propertyPaths</code> <b>please refer to:</b>
|
72
|
* {@link IBeanInitializer#initialize(Object, List)}
|
73
|
*
|
74
|
* @param pageSize The maximum number of objects returned (can be null for all matching objects)
|
75
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based,
|
76
|
* can be null, equivalent of starting at the beginning of the recordset)
|
77
|
* @param submitter
|
78
|
* Limits the result set to Registrations having the given submitter. This filter is ignored if set to <code>null</code>.
|
79
|
* @param includedStatus
|
80
|
* filters the Registration by the RegistrationStatus. Only Registration having one of
|
81
|
* the supplied status will included.
|
82
|
* @param orderHints
|
83
|
* Supports path like <code>orderHints.propertyNames</code> which
|
84
|
* include *-to-one properties like createdBy.username or
|
85
|
* authorTeam.persistentTitleCache
|
86
|
* @param propertyPaths
|
87
|
* @return
|
88
|
* @throws DataAccessException
|
89
|
*/
|
90
|
public Pager<Registration> page(User submitter, Collection<RegistrationStatus> includedStatus,
|
91
|
String identifierFilterPattern, String taxonNameFilterPattern,
|
92
|
Integer pageSize, Integer pageIndex, List<OrderHint> orderHints, List<String> propertyPaths);
|
93
|
|
94
|
|
95
|
|
96
|
}
|