Revision b22621fd
Added by Patrick Plitzner over 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionSettingsConfigWindow.java | ||
---|---|---|
298 | 298 |
|
299 | 299 |
private UuidAndTitleCache<TaxonNode> getUuidAndTitleCacheFromRowId(Object classificationSelection) { |
300 | 300 |
String uuidString = (String) classificationBox.getContainerProperty(classificationSelection, "uuid").getValue(); |
301 |
int id = (int) classificationBox.getContainerProperty(classificationSelection, "rootNode_id").getValue(); |
|
301 |
Property rootNodeContainerProperty = null; |
|
302 |
|
|
303 |
Collection<?> ids = classificationBox.getContainerPropertyIds(); |
|
304 |
//use for loop here because the case of the root node id columns differs between some DBs |
|
305 |
for (Object id : ids) { |
|
306 |
if(id instanceof String && ((String) id).toLowerCase().equals("rootnode_id")){ |
|
307 |
rootNodeContainerProperty = classificationBox.getContainerProperty(classificationSelection, id); |
|
308 |
break; |
|
309 |
} |
|
310 |
} |
|
311 |
int id = (int) rootNodeContainerProperty.getValue(); |
|
302 | 312 |
String titleCache = (String) classificationBox.getContainerProperty(classificationSelection, "titleCache").getValue(); |
303 | 313 |
UUID uuid = UUID.fromString(uuidString); |
304 | 314 |
UuidAndTitleCache<TaxonNode> parent = new UuidAndTitleCache<>(uuid, id, titleCache); |
Also available in: Unified diff
ref #5458 Avoid possible exception for case sensitive root node column