Project

General

Profile

Download (2.5 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 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

    
10
package eu.etaxonomy.cdm.persistence.dao.description;
11

    
12
import java.util.List;
13
import java.util.UUID;
14

    
15
import org.springframework.dao.DataAccessException;
16

    
17
import eu.etaxonomy.cdm.model.description.IIdentificationKey;
18

    
19
/**
20
 * A read-only interface to allow querying across all IIdentificationKey instances, regardless of type
21
 * @author ben.clark
22
 * @version 1.0
23
 * @since 21-Dec-2009 13:48:10
24
 */
25
public interface IIdentificationKeyDao {
26

    
27

    
28
	/**
29
	 * Returns a sublist of IIdentificationKey instances stored in the database. A maximum
30
	 * of 'limit' objects are returned, starting at object with index 'start'.
31
	 *
32
	 * @param type
33
	 * @param limit
34
	 *            the maximum number of entities returned (can be null to return
35
	 *            all entities)
36
	 * @param start
37
	 * @return
38
	 * @throws DataAccessException
39
	 */
40
	public List<IIdentificationKey> list(Integer limit, Integer start, List<String> propertyPaths);
41

    
42
	/**
43
	 * Returns the number of objects of type IIdentificationKey
44
	 * @return
45
	 */
46
	public long count();
47

    
48
	/**
49
	 * Finds IdentificationKeys which cover the Taxon given as parameter
50
	 *
51
	 * @param taxon
52
	 *            The Taxon to search IdentificationKeys for
53
	 * @param type
54
	 *            may restrict the type to a specific implementation of
55
	 *            IIdentificationKey
56
	 * @param pageSize
57
	 *            The maximum number of objects returned (can be null for all
58
	 *            matching objects)
59
	 * @param pageNumber
60
	 *            The offset (in pageSize chunks) from the start of the result
61
	 *            set (0 - based, can be null, equivalent of starting at the
62
	 *            beginning of the recordset)
63
	 * @param propertyPaths
64
	 *            properties to be initialized
65
	 * @return a List of IdentificationKeys
66
	 */
67
	public <T extends IIdentificationKey> List<T> findByTaxonomicScope(
68
	        UUID taxonUuid, Class<T> type, Integer pageSize,
69
			Integer pageNumber, List<String> propertyPaths);
70

    
71
	/**
72
	 * Counts IdentificationKeys which cover the Taxon given as parameter
73
	 *
74
	 * @param taxon The Taxon to search IdentificationKeys for
75
	 * @param type may restrict the type to a specific implementation of
76
	 *            IIdentificationKey
77
	 * @return
78
	 */
79
	public <T extends IIdentificationKey> long countByTaxonomicScope(UUID taxonUuid, Class<T> type);
80
}
(7-7/10)