Project

General

Profile

« Previous | Next » 

Revision 45cac117

Added by Katja Luther over 5 years ago

ref #7939: add oderInderComnparator and use it in taxonnodeDtoRankAndNameComparator

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dto/TaxonNodeDto.java
12 12
import java.util.List;
13 13
import java.util.UUID;
14 14

  
15
import eu.etaxonomy.cdm.model.name.Rank;
16 15
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
17 16
import eu.etaxonomy.cdm.model.taxon.Synonym;
18 17
import eu.etaxonomy.cdm.model.taxon.Taxon;
......
75 74

  
76 75
    private final String treeIndex;
77 76
    private final Integer sortIndex;
78
    private Rank rank;
77

  
78
    private Integer rankOrderIndex;
79 79

  
80 80

  
81 81

  
......
96 96
            taggedTitle = taxon.getName() != null? taxon.getName().getTaggedName() : taxon.getTaggedTitle();
97 97
            rankLabel = taxon.getNullSafeRank() != null ? taxon.getNullSafeRank().getLabel() : null;
98 98
            this.setAbbrevTitleCache(taxon.getTitleCache());
99
            rank = taxon.getName() != null? taxon.getName().getRank() : null;
99
            rankOrderIndex = taxon.getName() != null && taxon.getName().getRank() != null? taxon.getName().getRank().getOrderIndex() : null;
100

  
100 101
        }else{
101 102
            setTitleCache(taxonNode.getClassification().getTitleCache());
102
            rank = null;
103
            rankOrderIndex = null;
103 104
        }
104 105
        taxonomicChildrenCount = taxonNode.getCountChildren();
105 106
        unplaced = taxonNode.isUnplaced();
......
208 209
        return sortIndex;
209 210
    }
210 211

  
211
    public Rank getRank() {
212
        return rank;
212
    public Integer getRankOrderIndex() {
213
        return rankOrderIndex;
213 214
    }
214 215

  
215
    public void setRank(Rank rank) {
216
        this.rank = rank;
217
    }
218 216

  
219 217
    public String getTaxonTitleCache(){
220 218
        return getAbbrevTitleCache();

Also available in: Unified diff