Project

General

Profile

Download (3.41 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2020 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.dto;
10

    
11
import java.util.UUID;
12

    
13
import eu.etaxonomy.cdm.model.name.Rank;
14

    
15
/**
16
 * @author a.kohlbecker
17
 * @since Mar 20, 2020
18
 */
19
public class SortableTaxonNodeQueryResult {
20

    
21
    protected UUID taxonNodeUuid;
22
    protected Integer taxonNodeId;
23
    protected String taxonTitleCache;
24
    protected String nameTitleCache;
25
    protected Rank nameRank = Rank.UNKNOWN_RANK();
26
    protected UUID parentNodeUuid;
27

    
28
    /**Is this the reason
29
     * @param taxonNodeUuid
30
     * @param taxonNodeId
31
     * @param taxonTitleCache
32
     * @param nameRank {@link Rank.#UNKNOWN_RANK()} will be used in case this is <code>null</code>
33
     */
34
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String taxonTitleCache, String nameTitleCache,
35
            Rank nameRank, UUID parentNodeUuid) {
36
        this.taxonNodeUuid = taxonNodeUuid;
37
        this.taxonNodeId = taxonNodeId;
38
        this.taxonTitleCache = taxonTitleCache;
39
        this.nameTitleCache = nameTitleCache;
40
        if(nameRank != null){
41
            this.nameRank = nameRank;
42
        }
43
        this.parentNodeUuid = parentNodeUuid;
44
    }
45

    
46
    /**
47
     * @param taxonNodeUuid
48
     * @param taxonNodeId
49
     * @param taxonTitleCache
50
     * @param nameRank {@link Rank.#UNKNOWN_RANK()} will be used in case this is <code>null</code>
51
     */
52
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String taxonTitleCache,
53
            Rank nameRank, UUID parentNodeUuid) {
54
        this(taxonNodeUuid, taxonNodeId, taxonTitleCache, null, nameRank, parentNodeUuid);
55
    }
56

    
57
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String taxonTitleCache,
58
            Rank nameRank) {
59
        this(taxonNodeUuid, taxonNodeId, taxonTitleCache, null, nameRank, null);
60
    }
61
    public SortableTaxonNodeQueryResult(UUID taxonNodeUuid, Integer taxonNodeId, String taxonTitleCache, UUID parentNodeUuid) {
62
        this(taxonNodeUuid, taxonNodeId, taxonTitleCache, null, parentNodeUuid);
63
    }
64

    
65
    public UUID getTaxonNodeUuid() {
66
        return taxonNodeUuid;
67
    }
68
    public void setTaxonNodeUuid(UUID taxonNodeUuid) {
69
        this.taxonNodeUuid = taxonNodeUuid;
70
    }
71
    /**
72
     * @return the parentNodeUuid
73
     */
74
    public UUID getParentNodeUuid() {
75
        return parentNodeUuid;
76
    }
77

    
78
    /**
79
     * @param parentNodeUuid the parentNodeUuid to set
80
     */
81
    public void setParentNodeUuid(UUID parentNodeUuid) {
82
        this.parentNodeUuid = parentNodeUuid;
83
    }
84

    
85
    public Integer getTaxonNodeId() {
86
        return taxonNodeId;
87
    }
88
    public void setTaxonNodeId(Integer taxonNodeId) {
89
        this.taxonNodeId = taxonNodeId;
90
    }
91
    public String getTaxonTitleCache() {
92
        return taxonTitleCache;
93
    }
94
    public void setTaxonTitleCache(String taxonTitleCache) {
95
        this.taxonTitleCache = taxonTitleCache;
96
    }
97
    public Rank getNameRank() {
98
        return nameRank;
99
    }
100
    public void setNameRank(Rank nameRank) {
101
        this.nameRank = nameRank;
102
    }
103

    
104
    public String getNameTitleCache() {
105
        return nameTitleCache;
106
    }
107
    public void setNameTitleCache(String nameTitleCache) {
108
        this.nameTitleCache = nameTitleCache;
109
    }
110

    
111

    
112
}
(12-12/29)