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