1
|
/**
|
2
|
* Copyright (C) 2009 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.api.service;
|
11
|
|
12
|
import java.util.List;
|
13
|
|
14
|
import eu.etaxonomy.cdm.api.service.pager.Pager;
|
15
|
import eu.etaxonomy.cdm.model.occurrence.Collection;
|
16
|
|
17
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
18
|
|
19
|
public interface ICollectionService extends IIdentifiableEntityService<Collection> {
|
20
|
|
21
|
/**
|
22
|
* Returns a Paged List of Collection instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
|
23
|
*
|
24
|
* @param clazz filter the results by class (or pass null to return all Collection instances)
|
25
|
* @param queryString
|
26
|
* @param pageSize The maximum number of collections returned (can be null for all matching collections)
|
27
|
* @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
|
28
|
* @param orderHints
|
29
|
* Supports path like <code>orderHints.propertyNames</code> which
|
30
|
* include *-to-one properties like createdBy.username or
|
31
|
* authorTeam.persistentTitleCache
|
32
|
* @param propertyPaths properties to be initialized
|
33
|
* @return a Pager Collection instances
|
34
|
* @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
|
35
|
*/
|
36
|
public Pager<Collection> search(Class<? extends Collection> clazz, String query, Integer pageSize,Integer pageNumber, List<OrderHint> orderHints,List<String> propertyPaths);
|
37
|
|
38
|
/**
|
39
|
* Return a list of collections matching the given code
|
40
|
* @param code
|
41
|
* @return a List of Collection objects
|
42
|
*/
|
43
|
public List<Collection> searchByCode(String code);
|
44
|
}
|