search by title with paging capabilities and substring options
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / persistence / dao / taxon / ITaxonDao.java
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.taxon;
11
12 import java.util.List;
13 import eu.etaxonomy.cdm.model.reference.ReferenceBase;
14 import eu.etaxonomy.cdm.model.taxon.Taxon;
15 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
16 import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
17 import eu.etaxonomy.cdm.persistence.dao.common.ITitledDao;
18 import eu.etaxonomy.cdm.persistence.fetch.CdmFetch;
19
20 /**
21 * @author a.mueller
22 *
23 */
24 public interface ITaxonDao extends IIdentifiableDao<TaxonBase>, ITitledDao<TaxonBase> {
25
26 public List<TaxonBase> getTaxaByName(String name, ReferenceBase sec);
27
28 /**
29 * Computes all Taxon instances that do not have a taxonomic parent and has at least one child.
30 * @return The List<Taxon> of root taxa.
31 */
32 public List<Taxon> getRootTaxa(ReferenceBase sec);
33
34
35
36 /**
37 * Computes all Taxon instances that do not have a taxonomic parent.
38 * @param sec The concept reference that the taxon belongs to
39 * @param cdmFetch TODO
40 * @param onlyWithChildren if true only taxa are returned that have taxonomic children. <Br>Default: true.
41 * @return The List<Taxon> of root taxa.
42 */
43 public List<Taxon> getRootTaxa(ReferenceBase sec, CdmFetch cdmFetch, Boolean onlyWithChildren);
44
45 /**
46 * @param pagesize max maximum number of returned taxa
47 * @param page page to start, with 0 being first page
48 * @return
49 */
50 public List<TaxonBase> getAllTaxa(Integer pagesize, Integer page);
51 }