Project

General

Profile

Download (4.67 KB) Statistics
| Branch: | Tag: | Revision:
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 org.springframework.dao.DataAccessException;
16

    
17
import eu.etaxonomy.cdm.api.service.pager.Pager;
18
import eu.etaxonomy.cdm.model.common.User;
19
import eu.etaxonomy.cdm.model.name.Registration;
20
import eu.etaxonomy.cdm.model.name.RegistrationStatus;
21
import eu.etaxonomy.cdm.model.reference.Reference;
22
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
23
import eu.etaxonomy.cdm.persistence.query.OrderHint;
24

    
25
/**
26
 * @author a.kohlbecker
27
 * @since May 2, 2017
28
 *
29
 */
30
public interface IRegistrationService extends IAnnotatableService<Registration> {
31

    
32
    /**
33
     * Returns a sublist of Registration instances stored in the database. A maximum
34
     * of 'limit' objects are returned, starting at object with index 'start'.
35
     * The bean properties specified by the parameter <code>propertyPaths</code>
36
     * and recursively initialized for each of the entities in the resultset
37
     *
38
     * For detailed description and examples regarding
39
     * <code>propertyPaths</code> <b>please refer to:</b>
40
     * {@link IBeanInitializer#initialize(Object, List)}
41
     *
42
     * @param pageSize The maximum number of objects returned (can be null for all matching objects)
43
     * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based,
44
     *                   can be null, equivalent of starting at the beginning of the recordset)
45
     * @param reference
46
     *            filters the Registration by the reference of the nomenclatural act for which the
47
     *            Registration as been created. The name and all type designations associated with
48
     *            the Registration are sharing the same  citation.
49
     *            If the Optional itself is <code>null</code> the parameter is neglected.
50
     *            If Optional contains the value <code>null</code> all registrations with a name
51
     *            or type designation that has no reference are returned.
52
     *            Also those registrations having no name and type designation at all.
53
     * @param includedStatus
54
     *            filters the Registration by the RegistrationStatus. Only Registration having one of the
55
     *            supplied status will included.
56
//     * @param orderHints
57
//     *            Supports path like <code>orderHints.propertyNames</code> which
58
//     *            include *-to-one properties like createdBy.username or
59
//     *            authorTeam.persistentTitleCache
60
     * @param propertyPaths
61
     * @return
62
     * @throws DataAccessException
63
     */
64
    public Pager<Registration> page(Optional<Reference> reference, Collection<RegistrationStatus> includedStatus,
65
            Integer pageSize, Integer pageIndex, List<String> propertyPaths);
66

    
67
    /**
68
     * Returns a sublist of Registration instances stored in the database. A maximum
69
     * of 'limit' objects are returned, starting at object with index 'start'.
70
     * The bean properties specified by the parameter <code>propertyPaths</code>
71
     * and recursively initialized for each of the entities in the resultset
72
     *
73
     * For detailed description and examples regarding
74
     * <code>propertyPaths</code> <b>please refer to:</b>
75
     * {@link IBeanInitializer#initialize(Object, List)}
76
     *
77
     * @param pageSize The maximum number of objects returned (can be null for all matching objects)
78
     * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based,
79
     *                   can be null, equivalent of starting at the beginning of the recordset)
80
     * @param submitter
81
     *            Limits the result set to Registrations having the given submitter. This filter is ignored if set to <code>null</code>.
82
     * @param includedStatus
83
     *            filters the Registration by the RegistrationStatus. Only Registration having one of
84
     *            the supplied status will included.
85
     * @param orderHints
86
     *            Supports path like <code>orderHints.propertyNames</code> which
87
     *            include *-to-one properties like createdBy.username or
88
     *            authorTeam.persistentTitleCache
89
     * @param propertyPaths
90
     * @return
91
     * @throws DataAccessException
92
     */
93
    public Pager<Registration> page(User submitter, Collection<RegistrationStatus> includedStatus,
94
            Integer pageSize, Integer pageIndex, List<OrderHint> orderHints, List<String> propertyPaths);
95

    
96

    
97

    
98
}
(57-57/101)