Revision 95e756cb
Added by Andreas Müller about 16 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/TermVocabulary.java | ||
---|---|---|
76 | 76 |
setTermSourceUri(termSourceUri); |
77 | 77 |
} |
78 | 78 |
|
79 |
@OneToMany(mappedBy="vocabulary") |
|
80 |
@Type(type="DefinedTermBase") |
|
81 |
@Cascade({CascadeType.SAVE_UPDATE}) |
|
79 |
@Transient |
|
82 | 80 |
public Set<T> getTerms() { |
83 | 81 |
//Set<T> result = getNewTermSet(); |
84 | 82 |
//result.addAll(terms); |
... | ... | |
88 | 86 |
protected void setTerms(Set<T> terms) { |
89 | 87 |
this.terms = terms; |
90 | 88 |
} |
89 |
|
|
90 |
@OneToMany(mappedBy="persistentVocabulary") |
|
91 |
@Type(type="DefinedTermBase") |
|
92 |
@Cascade({CascadeType.SAVE_UPDATE}) |
|
93 |
public Set<T> getPersistentTerms() { |
|
94 |
return terms; |
|
95 |
} |
|
96 |
protected void setPersistentTerms(Set<T> terms) { |
|
97 |
this.terms = terms; |
|
98 |
} |
|
91 | 99 |
public void addTerm(T term) throws WrongTermTypeException { |
92 | 100 |
if (terms.size()<1){ |
93 | 101 |
// no term yet in the list. First term defines the vocabulary kind |
Also available in: Unified diff