Merged in changes from cate-development branch and upgraded to spring 3.0.0.RC1
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IReferenceService.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.cdm.api.service;
12
13 import java.util.List;
14
15 import eu.etaxonomy.cdm.api.service.pager.Pager;
16 import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
17 import eu.etaxonomy.cdm.model.reference.ReferenceBase;
18 import eu.etaxonomy.cdm.persistence.query.OrderHint;
19
20
21 public interface IReferenceService extends IIdentifiableEntityService<ReferenceBase> {
22
23 /**
24 * Returns a Paged List of ReferenceBase instances where the default field matches the String queryString (as interpreted by the Lucene QueryParser)
25 *
26 * @param clazz filter the results by class (or pass null to return all ReferenceBase instances)
27 * @param queryString
28 * @param pageSize The maximum number of references returned (can be null for all matching references)
29 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
30 * @param orderHints
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 ReferenceBase instances
36 * @see <a href="http://lucene.apache.org/java/2_4_0/queryparsersyntax.html">Apache Lucene - Query Parser Syntax</a>
37 */
38 public Pager<ReferenceBase> search(Class<? extends ReferenceBase> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
39
40 /**
41 * Returns a map that holds uuid, titleCache pairs of all references in the current database
42 *
43 * @return
44 * a <code>Map</code> containing uuid and titleCache of references
45 */
46 public List<UuidAndTitleCache> getUuidAndTitleCacheOfReferences();
47
48 }