Project

General

Profile

« Previous | Next » 

Revision 9dc896c9

Added by Andreas Müller almost 7 years ago

fix #6368 rename table and class TaxonNameBase

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/HybridRelationship.java
68 68
    @XmlSchemaType(name = "IDREF")
69 69
    @ManyToOne(fetch=FetchType.LAZY)
70 70
    @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE})
71
	private TaxonNameBase<?,?> relatedFrom;
71
	private TaxonName<?,?> relatedFrom;
72 72

  
73 73
	@XmlElement(name = "RelatedTo")
74 74
    @XmlIDREF
75 75
    @XmlSchemaType(name = "IDREF")
76 76
    @ManyToOne(fetch=FetchType.LAZY)
77 77
    @Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE})
78
	private TaxonNameBase<?,?> relatedTo;
78
	private TaxonName<?,?> relatedTo;
79 79

  
80 80
    @XmlElement(name = "Type")
81 81
    @XmlIDREF
......
103 103
	 * @param type				the relationship type to be assigned to the new hybrid relationship
104 104
	 * @param ruleConsidered	the string indicating the article of the ICBN for the hybrid taxon name
105 105
	 * @see						#HybridRelationship(BotanicalName, BotanicalName, HybridRelationshipType, Reference, String, String)
106
	 * @see						TaxonNameBase#addHybridRelationship(HybridRelationship)
106
	 * @see						TaxonName#addHybridRelationship(HybridRelationship)
107 107
	 */
108 108
	protected HybridRelationship(INonViralName hybridName, INonViralName parentName, HybridRelationshipType type, String ruleConsidered) {
109 109
		this(hybridName, parentName, type, null, null, ruleConsidered);
......
121 121
	 * @param citationMicroReference	the string with the details describing the exact localisation within the reference
122 122
	 * @param ruleConsidered		the string indicating the article of the ICBN for the hybrid taxon name
123 123
	 * @see							#HybridRelationship(BotanicalName, BotanicalName, HybridRelationshipType, String)
124
	 * @see							TaxonNameBase#addHybridRelationship(HybridRelationship)
124
	 * @see							TaxonName#addHybridRelationship(HybridRelationship)
125 125
	 */
126 126
	protected HybridRelationship(INonViralName  hybridName, INonViralName parentName, HybridRelationshipType type, Reference citation, String citationMicroReference, String ruleConsidered) {
127 127
		super(parentName, hybridName, type, citation, citationMicroReference);
......
138 138
	 * @see   eu.etaxonomy.cdm.model.common.RelationshipBase#getRelatedFrom()
139 139
	 */
140 140
	@Transient
141
	public TaxonNameBase getParentName(){
141
	public TaxonName getParentName(){
142 142
		return this.getRelatedFrom();
143 143
	}
144 144
	/**
......
156 156
	 * @see   eu.etaxonomy.cdm.model.common.RelationshipBase#getRelatedTo()
157 157
	 */
158 158
	@Transient
159
	public TaxonNameBase getHybridName(){
159
	public TaxonName getHybridName(){
160 160
		return this.getRelatedTo();
161 161
	}
162 162
	/**
......
183 183
	}
184 184

  
185 185
	@Override
186
    protected TaxonNameBase getRelatedFrom() {
186
    protected TaxonName getRelatedFrom() {
187 187
		return relatedFrom;
188 188
	}
189 189

  
190 190
	@Override
191
    protected TaxonNameBase getRelatedTo() {
191
    protected TaxonName getRelatedTo() {
192 192
		return relatedTo;
193 193
	}
194 194

  
......
199 199

  
200 200
	@Override
201 201
    protected void setRelatedFrom(INonViralName relatedFrom) {
202
		this.relatedFrom = TaxonNameBase.castAndDeproxy(relatedFrom);
202
		this.relatedFrom = TaxonName.castAndDeproxy(relatedFrom);
203 203
	}
204 204

  
205 205
	@Override
206 206
    protected void setRelatedTo(INonViralName relatedTo) {
207
		this.relatedTo = TaxonNameBase.castAndDeproxy(relatedTo);
207
		this.relatedTo = TaxonName.castAndDeproxy(relatedTo);
208 208
	}
209 209

  
210 210
	@Override
......
222 222
		if (compareType != 0){
223 223
			return compareType;
224 224
		}else{
225
		    TaxonNameBase<?,?> related1 = this.getRelatedFrom();
226
		    TaxonNameBase<?,?> related2 = rel2.getRelatedFrom();
225
		    TaxonName<?,?> related1 = this.getRelatedFrom();
226
		    TaxonName<?,?> related2 = rel2.getRelatedFrom();
227 227
			if (related1 != related2){
228 228
				related1 = this.getRelatedTo();
229 229
				related2 = rel2.getRelatedTo();
......
247 247
	 * modifying only some of the attributes.<BR>
248 248
	 * CAUTION: Cloning a relationship will not add the relationship to the according
249 249
	 * {@link #relatedFrom} and {@link #relatedTo} objects. The method is meant to be used
250
	 * mainly for internal purposes (e.g. used within {@link TaxonNameBase#clone()}
250
	 * mainly for internal purposes (e.g. used within {@link TaxonName#clone()}
251 251
	 *
252 252
	 * @see eu.etaxonomy.cdm.model.common.RelationshipBase#clone()
253 253
	 * @see java.lang.Object#clone()

Also available in: Unified diff