Revision a784f00f
Added by Katja Luther about 14 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/agent/Institution.java | ||
---|---|---|
83 | 83 |
@Size(max = 255) |
84 | 84 |
private String name; |
85 | 85 |
|
86 |
@XmlElementWrapper(name = "Types") |
|
86 |
@XmlElementWrapper(name = "Types", nillable = true)
|
|
87 | 87 |
@XmlElement(name = "Type") |
88 | 88 |
@XmlIDREF |
89 | 89 |
@XmlSchemaType(name = "IDREF") |
90 | 90 |
@ManyToMany(fetch = FetchType.LAZY) |
91 |
@NotNull |
|
92 |
private Set<InstitutionType> types = new HashSet<InstitutionType>(); |
|
91 |
private Set<InstitutionType> types; |
|
93 | 92 |
|
94 | 93 |
@XmlElement(name = "IsPartOf") |
95 | 94 |
@XmlIDREF |
... | ... | |
138 | 137 |
* @see InstitutionType |
139 | 138 |
*/ |
140 | 139 |
public void addType(InstitutionType t){ |
141 |
this.types.add(t);
|
|
140 |
getTypes().add(t);
|
|
142 | 141 |
} |
143 | 142 |
|
144 | 143 |
/** |
... | ... | |
148 | 147 |
* @see #getTypes() |
149 | 148 |
*/ |
150 | 149 |
public void removeType(InstitutionType t){ |
151 |
this.types.remove(t);
|
|
150 |
getTypes().remove(t);
|
|
152 | 151 |
} |
153 | 152 |
|
154 | 153 |
/** |
Also available in: Unified diff
merge cate-development2 branch with trunk