Revision 3c420001
Added by Andreas Müller over 2 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/CdmLinkSource.java | ||
---|---|---|
94 | 94 |
} |
95 | 95 |
} |
96 | 96 |
|
97 |
//maybe only workaround #9801 |
|
98 |
public boolean hasNoTarget(){ |
|
99 |
return taxon == null && description == null; |
|
100 |
} |
|
101 |
|
|
97 | 102 |
public void setTarget(ICdmTarget target) { |
98 | 103 |
target = CdmBase.deproxy(target); |
99 |
if (target instanceof DescriptionBase<?>){ |
|
104 |
if (target == null){ |
|
105 |
setToNull(); //workaround? #9801 |
|
106 |
}else if (target instanceof DescriptionBase<?>){ |
|
100 | 107 |
this.description = (DescriptionBase<?>)target; |
101 | 108 |
}else if (target instanceof Taxon){ |
102 | 109 |
this.taxon = (Taxon)target; |
... | ... | |
105 | 112 |
} |
106 | 113 |
} |
107 | 114 |
|
115 |
//workaround? #9801 |
|
116 |
private void setToNull() { |
|
117 |
this.description = null; |
|
118 |
this.taxon = null; |
|
119 |
} |
|
120 |
|
|
108 | 121 |
// ********************************* CLONE **********************************/ |
109 | 122 |
|
110 | 123 |
@Override |
Also available in: Unified diff
ref #9801, ref #7980, ref #8871 remove aggregated source descriptions from aggregation and fix persistence issues