Project

General

Profile

« Previous | Next » 

Revision 523bd6bc

Added by Katja Luther 5 months ago

ref #9907: fix missing treeIndex in taxonNodeDto

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dto/SortableTaxonNodeQueryResult.java
20 20

  
21 21
    protected UUID taxonNodeUuid;
22 22
    protected Integer taxonNodeId;
23
    protected String treeIndex;
24
    protected UUID taxonUuid;
23 25
    protected String taxonTitleCache;
24 26
    protected String nameTitleCache;
25 27
    protected Rank nameRank = Rank.UNKNOWN_RANK();
......
31 33
     * @param taxonTitleCache
32 34
     * @param nameRank {@link Rank.#UNKNOWN_RANK()} will be used in case this is <code>null</code>
33 35
     */
34
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String taxonTitleCache, String nameTitleCache,
36
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String treeIndex, UUID taxonUuid, String taxonTitleCache, String nameTitleCache,
35 37
            Rank nameRank, UUID parentNodeUuid) {
36 38
        this.taxonNodeUuid = taxonNodeUuid;
37 39
        this.taxonNodeId = taxonNodeId;
40
        this.treeIndex = treeIndex;
41
        this.taxonUuid = taxonUuid;
38 42
        this.taxonTitleCache = taxonTitleCache;
39 43
        this.nameTitleCache = nameTitleCache;
40 44
        if(nameRank != null){
......
49 53
     * @param taxonTitleCache
50 54
     * @param nameRank {@link Rank.#UNKNOWN_RANK()} will be used in case this is <code>null</code>
51 55
     */
52
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String taxonTitleCache,
56
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String treeIndex, UUID taxonUuid, String taxonTitleCache,
53 57
            Rank nameRank, UUID parentNodeUuid) {
54
        this(taxonNodeUuid, taxonNodeId, taxonTitleCache, null, nameRank, parentNodeUuid);
58
        this(taxonNodeUuid, taxonNodeId, treeIndex, taxonUuid, taxonTitleCache, null, nameRank, parentNodeUuid);
55 59
    }
56 60

  
57 61

  
62
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String treeIndex, UUID taxonUuid, String taxonTitleCache,
63
            Rank nameRank) {
64
        this(taxonNodeUuid, taxonNodeId, treeIndex, taxonUuid, taxonTitleCache, null, nameRank, null);
65
    }
66

  
58 67
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String taxonTitleCache,
59 68
            Rank nameRank) {
60
        this(taxonNodeUuid, taxonNodeId, taxonTitleCache, null, nameRank, null);
69
        this(taxonNodeUuid, taxonNodeId, null, null, taxonTitleCache, null, nameRank, null);
70
    }
71
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, UUID taxonUuid, String taxonTitleCache, UUID parentNodeUuid) {
72
        this(taxonNodeUuid, taxonNodeId, null, taxonUuid, taxonTitleCache, null, parentNodeUuid);
61 73
    }
62 74
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String taxonTitleCache, UUID parentNodeUuid) {
63
        this(taxonNodeUuid, taxonNodeId, taxonTitleCache, null, parentNodeUuid);
75
        this(taxonNodeUuid, taxonNodeId, null, null, taxonTitleCache, null, parentNodeUuid);
76
    }
77

  
78
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, UUID taxonUuid, String taxonTitleCache) {
79
        this(taxonNodeUuid, taxonNodeId, null, taxonUuid, taxonTitleCache, null, null);
64 80
    }
65 81
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String taxonTitleCache) {
66
        this(taxonNodeUuid, taxonNodeId, taxonTitleCache, null, null);
82
        this(taxonNodeUuid, taxonNodeId, null, null, taxonTitleCache, null, null);
67 83
    }
68 84

  
69 85
    public UUID getTaxonNodeUuid() {
......
72 88
    public void setTaxonNodeUuid(UUID taxonNodeUuid) {
73 89
        this.taxonNodeUuid = taxonNodeUuid;
74 90
    }
91

  
92
    public String getTreeIndex() {
93
        return treeIndex;
94
    }
95
    public void setTreeIndex(String treeIndex) {
96
        this.treeIndex = treeIndex;
97
    }
98
    public UUID getTaxonUuid() {
99
        return taxonUuid;
100
    }
101
    public void setTaxonUuid(UUID taxonUuid) {
102
        this.taxonUuid = taxonUuid;
103
    }
104

  
75 105
    /**
76 106
     * @return the parentNodeUuid
77 107
     */
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dto/TaxonNodeDto.java
92 92

  
93 93
    }
94 94

  
95
    public TaxonNodeDto(UUID uuid, Integer id, String nameTitleCache, String taxonTitleCache, Integer rankOrderIndex, UUID parentUuid) {
95
    public TaxonNodeDto(UUID uuid, Integer id, String treeIndex, String nameTitleCache, String taxonTitleCache, Integer rankOrderIndex, UUID parentUuid) {
96 96
        super(uuid, id, nameTitleCache, taxonTitleCache);
97 97
        this.rankOrderIndex = rankOrderIndex;
98 98
        this.parentUUID = parentUuid;
99
        this.treeIndex = treeIndex;
99 100
    }
100 101

  
101 102
    public TaxonNodeDto(UUID uuid, Integer id, String titleCache, Integer rankOrderIndex) {
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImpl.java
1206 1206
        TaxonNodeDto commonParent = null;
1207 1207
        List<String> treePath = null;
1208 1208
        for (TaxonNodeDto nodeDto : nodes) {
1209
            if (nodeDto == null){
1210
                continue;
1211
            }
1209 1212
            String nodeTreeIndex = nodeDto.getTreeIndex();
1210 1213
            nodeTreeIndex = nodeTreeIndex.replaceFirst("#", "");
1211 1214
            String[] split = nodeTreeIndex.split("#");

Also available in: Unified diff