b60df863c4db6b9b407c6f51ec6ce0fc48fa86f4
[cdmlib.git] / cdmlib-persistence / src / main / java / eu / etaxonomy / cdm / persistence / dao / term / ITermTreeDao.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 package eu.etaxonomy.cdm.persistence.dao.term;
10
11 import java.util.List;
12 import java.util.UUID;
13
14 import eu.etaxonomy.cdm.model.term.TermNode;
15 import eu.etaxonomy.cdm.model.term.TermTree;
16 import eu.etaxonomy.cdm.model.term.TermType;
17 import eu.etaxonomy.cdm.persistence.dao.common.IIdentifiableDao;
18 import eu.etaxonomy.cdm.persistence.dto.TermCollectionDto;
19 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
20
21 /**
22 * @author a.mueller
23 * @since 10.07.2008
24 */
25 public interface ITermTreeDao extends IIdentifiableDao<TermTree> {
26
27 public UUID DefaultFeatureTreeUuid = UUID.fromString("ac8d4e58-926d-4f81-ac77-cebdd295df7c");
28
29 public List<TermTree> list();
30
31 /**
32 * Loads nodes and the nodes child nodes recursively
33 */
34 public void deepLoadNodes(List<TermNode> nodes, List<String> nodePaths);
35
36 public <S extends TermTree> List<UuidAndTitleCache<S>> getUuidAndTitleCacheByTermType(Class<S> clazz, TermType termType, Integer limit,
37 String pattern);
38
39 public <S extends TermTree> List<TermCollectionDto> listTermTreeDtosByTermType(TermType termType);
40
41 public TermCollectionDto getTermTreeDtosByUuid(UUID uuid);
42
43 /**
44 * Returns list of term trees for list of UUIDs
45 *
46 * @param vocUuids the {@link UUID} of the trees
47 * @return term trees
48 */
49 public List<TermCollectionDto> findVocabularyDtoByUuids(List<UUID> vocUuids);
50
51 }