c33b7cd2db7ca5b734cff8378b9fba7c75ab8030
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / persistence / dao / common / ITermVocabularyDao.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.common;
11
12
13 import java.util.List;
14
15 import eu.etaxonomy.cdm.model.common.DefinedTermBase;
16 import eu.etaxonomy.cdm.model.common.TermVocabulary;
17
18
19 /**
20 * @author a.mueller
21 *
22 */
23 public interface ITermVocabularyDao extends ICdmEntityDao<TermVocabulary<DefinedTermBase>> {
24
25 /**
26 * Return a count of terms that belong to the termVocabulary supplied
27 *
28 * @param termVocabulary The term vocabulary which 'owns' the terms of interest
29 * @return a count of terms
30 */
31 public int countTerms(TermVocabulary termVocabulary);
32
33 /**
34 * Return a List of terms that belong to the termVocabulary supplied
35 *
36 * @param termVocabulary The term vocabulary which 'owns' the terms of interest
37 * @param pageSize The maximum number of terms returned (can be null for all terms)
38 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
39 * @return a List of terms
40 */
41 public <T extends DefinedTermBase> List<T> getTerms(TermVocabulary<T> termVocabulary, Integer pageSize, Integer pageNumber);
42 }