2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.api
.service
;
12 import java
.util
.List
;
14 import eu
.etaxonomy
.cdm
.api
.service
.pager
.Pager
;
15 import eu
.etaxonomy
.cdm
.model
.occurrence
.Collection
;
17 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
19 public interface ICollectionService
extends IIdentifiableEntityService
<Collection
> {
22 * Returns a Paged List of Collection instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
24 * @param clazz filter the results by class (or pass null to return all Collection instances)
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)
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>
36 public Pager
<Collection
> search(Class
<?
extends Collection
> clazz
, String query
, Integer pageSize
,Integer pageNumber
, List
<OrderHint
> orderHints
,List
<String
> propertyPaths
);
39 * Return a list of collections matching the given code
41 * @return a List of Collection objects
43 public List
<Collection
> searchByCode(String code
);