Project

General

Profile

Download (2.68 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.persistence.dao.name;
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.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.dao.common.IAnnotatableDao;
21
import eu.etaxonomy.cdm.persistence.dao.initializer.IBeanInitializer;
22

    
23
/**
24
 * @author a.kohlbecker
25
 * @since May 2, 2017
26
 *
27
 */
28
public interface IRegistrationDao
29
            extends IAnnotatableDao<Registration> {
30

    
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 reference
43
     *            filters the Registration by the reference of the nomenclatural act
44
     *            for which the Registration has been created.
45
     *            The name and all type designations associated with the Registration
46
     *            are sharing the same  reference.
47
     *            If <code>null</code> all registrations with a name or type designation
48
     *            that has no reference are returned. Also those registrations
49
     *            having no name and type designation at all.
50
     * @param includedStatus
51
     * @param limit
52
     *            the maximum number of entities returned (can be <code>null</code>
53
     *            to return all entities)
54
     * @param start
55
     * @param propertyPaths
56
     * @return
57
     * @throws DataAccessException
58
     */
59
    public List<Registration> list(Optional<Reference> reference, Collection<RegistrationStatus> includedStatus,
60
            Integer limit, Integer start, List<String> propertyPaths);
61

    
62
    /**
63
     * Counts the Registration instances stored in the database.
64
     *
65
     * For detailed description see the according list method
66
     * {@link #list(Optional, Collection, Integer, Integer, List)}}
67
     *
68
     * @return
69
     */
70
    public Long count(Optional<Reference> reference, Collection<RegistrationStatus> includedStatus);
71

    
72
}
(3-3/5)