Project

General

Profile

Download (3.47 KB) Statistics
| Branch: | Tag: | Revision:
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 java.util.Map;
14
import java.util.Set;
15
import java.util.UUID;
16

    
17
import eu.etaxonomy.cdm.model.taxon.Classification;
18
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
19
import eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation;
20
import eu.etaxonomy.cdm.persistence.dao.common.IAnnotatableDao;
21
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
22

    
23
/**
24
 * @author a.mueller
25
 *
26
 */
27
public interface ITaxonNodeDao extends IAnnotatableDao<TaxonNode> {
28

    
29
	public UUID delete(TaxonNode persistentObject, boolean deleteChildren);
30

    
31
	/**
32
    *
33
    * @return
34
    */
35
   public List<TaxonNode> getTaxonOfAcceptedTaxaByClassification(Classification classification, Integer start, Integer end);
36

    
37
    /**
38
     * @param classification
39
     * @return
40
     */
41
    public int countTaxonOfAcceptedTaxaByClassification(Classification classification);
42

    
43
    public List<TaxonNode> listChildrenOf(TaxonNode node, Integer pageSize, Integer pageIndex, List<String> propertyPaths, boolean recursive);
44

    
45
    public abstract Long countChildrenOf(TaxonNode node, Classification classification, boolean recursive);
46

    
47
    /**
48
     * Returns the of TaxonNodeAgentRelation entities which are associated with the TaxonNode for the
49
     * given TaxonUuid in the specified Classification.
50
     *
51
     * @param taxonUuid
52
     * @param agentUuid TODO
53
     * @param relTypeUuid TODO
54
     * @param start
55
     * @param limit
56
     * @param propertyPaths
57
     * @param rankId TODO
58
     * @param classification
59
     * @return
60
     */
61
    List<TaxonNodeAgentRelation> listTaxonNodeAgentRelations(UUID taxonUuid, UUID classificationUuid,
62
            UUID agentUuid, UUID rankUuid, UUID relTypeUuid, Integer start, Integer limit, List<String> propertyPaths);
63

    
64
    /**
65
     * Returns the number of TaxonNodeAgentRelation entities which are associated with the TaxonNode for the
66
     * given TaxonUuid in the specified Classification.
67
     *
68
     * @param taxonUuid
69
     * @param agentUuid TODO
70
     * @param relTypeUuid TODO
71
     * @param rankId TODO
72
     * @param classification
73
     * @return
74
     */
75
    long countTaxonNodeAgentRelations(UUID taxonUuid, UUID classificationUuid, UUID agentUuid, UUID rankUuid, UUID relTypeUuid);
76

    
77
    /**
78
     * Computes a map treeIndex->rank(sortIndex) for each given taxon node treeIndex. Required by #5957.
79
     * If the taxon represented by the treeindex is not in the given rank range no record is returned for the given
80
     * treeindex.
81
     *
82
     * @param treeIndex the list of treeIndexes
83
     * @param minRankOrderIndex min rank
84
     * @param maxRankOrderIndex max rank
85
     * @return
86
     */
87
    Map<String, Integer> rankOrderIndexForTreeIndex(List<String> treeIndex, Integer minRankOrderIndex,
88
            Integer maxRankOrderIndex);
89

    
90
    /**
91
     * For a given set of taxon node tree indexes the uuid and title cache of the taxon represented
92
     * by this treeindex is returned.
93
     * @param treeIndexSet set of taxon node tree indexes
94
     * @return map with treeindex and uuidAndTitleCache of the represented taxon
95
     */
96
    Map<String, UuidAndTitleCache<?>> taxonUuidsForTreeIndexes(Set<String> treeIndexSet);
97

    
98
}
(3-3/3)