Project

General

Profile

Download (2.43 KB) Statistics
| Branch: | Tag: | Revision:
1 2f72f4da Andreas Müller
/**
2
* Copyright (C) 2009 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.api.service;
10
11
import java.util.Collection;
12
import java.util.List;
13
import java.util.Map;
14
import java.util.UUID;
15
16 2ef4c225 Andreas Kohlbecker
import eu.etaxonomy.cdm.api.service.pager.Pager;
17 2f72f4da Andreas Müller
import eu.etaxonomy.cdm.model.term.TermNode;
18
import eu.etaxonomy.cdm.model.term.TermTree;
19
import eu.etaxonomy.cdm.model.term.TermType;
20 19b30c4f Andreas Kohlbecker
import eu.etaxonomy.cdm.persistence.dao.common.Restriction;
21 3037370e Katja Luther
import eu.etaxonomy.cdm.persistence.dto.TermTreeDto;
22 2f72f4da Andreas Müller
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
23 b820a890 Andreas Müller
import eu.etaxonomy.cdm.persistence.query.OrderHint;
24 2f72f4da Andreas Müller
25
public interface ITermTreeService extends IIdentifiableEntityService<TermTree> {
26
27 b820a890 Andreas Müller
    public List<TermTree> list(TermType termType, Integer limit, Integer start, List<OrderHint> orderHints, List<String> propertyPaths);
28 2ef4c225 Andreas Kohlbecker
29
    public Pager<TermTree> page(TermType termType, Integer pageSize, Integer pageIndex, List<OrderHint> orderHints, List<String> propertyPaths);
30 b820a890 Andreas Müller
31 2f72f4da Andreas Müller
	/**
32
	 * Loads a term tree including all of its nodes (all the way down to the tips of the tree).
33
	 * Because this method automatically adds term nodes recursively, adding "root" to property paths
34
	 * is superfluous - the propertyPaths argument should be used to initialize property paths <i>in addition</i>
35
	 * to the term nodes. The nodePaths argument is applied to each node in turn, so again, adding "children"
36
	 * is also superfluous. The nodePaths argument should be used to specify additional properties of the term node
37
	 * to initialize (e.g. feature).
38
	 *
39
	 */
40
	public TermTree loadWithNodes(UUID uuid, List<String> propertyPaths, List<String> nodePaths);
41
42
	public Map<UUID, TermNode> saveNodesAll(Collection<TermNode> featureNodeCollection);
43
44
	public Map<UUID, TermNode> saveOrUpdateNodesAll(Collection<TermNode> featureNodeCollection);
45
46
	public <S extends TermTree> List<UuidAndTitleCache<S>> getUuidAndTitleCacheByTermType(
47
	        Class<S> clazz, TermType termType, Integer limit, String pattern);
48 19b30c4f Andreas Kohlbecker
49 0a165781 Andreas Müller
    public List<Restriction<?>> buildTermTypeFilterRestrictions(TermType termType);
50 3037370e Katja Luther
51
    public List<TermTreeDto> listTermTreeDtosByTermType(TermType termType);
52 4d68581f Katja Luther
53
    public TermTreeDto getTermTreeDtoByUuid(UUID uuid);
54
55 4deab588 Andreas Müller
    public UpdateResult saveOrUpdateTermTreeDtoList(List<TermTreeDto> dtos);
56 adf08111 Katja Luther
57 4d68581f Katja Luther
58 2f72f4da Andreas Müller
}