Revision c7936eb4
Added by Andreas Kohlbecker over 5 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/model/name/TaxonNameDTO.java | ||
---|---|---|
44 | 44 |
|
45 | 45 |
private TaxonName name; |
46 | 46 |
|
47 |
private Set<TaxonName> persistedBasionyms; |
|
48 |
|
|
49 |
private Set<TaxonName> persistedReplacedSynonyms; |
|
50 |
|
|
51 | 47 |
private TaxonName persistedValidatedName; |
52 | 48 |
|
53 | 49 |
/** |
... | ... | |
100 | 96 |
|
101 | 97 |
public Set<TaxonName> getBasionyms() { |
102 | 98 |
Set<TaxonName> basionyms = name.getRelatedNames(Direction.relatedTo, NameRelationshipType.BASIONYM()); |
103 |
if(persistedBasionyms == null){ |
|
104 |
// remember the persisted state before starting to operate on the DTO |
|
105 |
persistedBasionyms = basionyms; |
|
106 |
} |
|
107 | 99 |
return basionyms; |
108 | 100 |
} |
109 | 101 |
|
110 | 102 |
public Set<TaxonName> getReplacedSynonyms() { |
111 | 103 |
Set<TaxonName> replacedSynonyms = name.getRelatedNames(Direction.relatedTo, NameRelationshipType.REPLACED_SYNONYM()); |
112 |
if(persistedReplacedSynonyms == null){ |
|
113 |
// remember the persisted state before starting to operate on the DTO |
|
114 |
persistedReplacedSynonyms = replacedSynonyms; |
|
115 |
} |
|
116 | 104 |
return replacedSynonyms; |
117 | 105 |
} |
118 | 106 |
|
... | ... | |
218 | 206 |
} |
219 | 207 |
} |
220 | 208 |
|
221 |
public Set<TaxonName> persistedBasionyms(){ |
|
222 |
return persistedBasionyms; |
|
223 |
} |
|
224 |
|
|
225 | 209 |
public TeamOrPersonBase<?> getCombinationAuthorship() { |
226 | 210 |
return name.getCombinationAuthorship(); |
227 | 211 |
} |
Also available in: Unified diff
TaxonNameDTO code cleaning