fix move synonym to another taxon
authorKatja Luther <k.luther@bgbm.org>
Thu, 3 Mar 2016 13:53:46 +0000 (14:53 +0100)
committerKatja Luther <k.luther@bgbm.org>
Thu, 3 Mar 2016 13:53:46 +0000 (14:53 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/MoveSynonymToAnotherAcceptedTaxonOperation.java

index ac1aca5ecb507148d3d198a5a6c089179e5b5ecb..1e3b300ded473df1a50d7b42f89c222035ed5ecb 100644 (file)
@@ -11,6 +11,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;\r
 \r
 import eu.etaxonomy.cdm.api.service.ITaxonService;\r
 import org.eclipse.core.runtime.IStatus;\r
 \r
 import eu.etaxonomy.cdm.api.service.ITaxonService;\r
+import eu.etaxonomy.cdm.api.service.UpdateResult;\r
 import eu.etaxonomy.cdm.api.service.exception.HomotypicalGroupChangeException;\r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.taxon.Synonym;\r
 import eu.etaxonomy.cdm.api.service.exception.HomotypicalGroupChangeException;\r
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;\r
 import eu.etaxonomy.cdm.model.taxon.Synonym;\r
@@ -76,17 +77,17 @@ public class MoveSynonymToAnotherAcceptedTaxonOperation extends
 \r
 \r
                ((TaxonNameEditor)EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor()).getConversationHolder().commit();\r
 \r
 \r
                ((TaxonNameEditor)EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor()).getConversationHolder().commit();\r
-\r
+               UpdateResult result;\r
 \r
 \r
                try {\r
 \r
 \r
                try {\r
-                       synRel = (SynonymRelationship) CdmStore.getService(ITaxonService.class).moveSynonymToAnotherTaxon(synRel,\r
+                       result = CdmStore.getService(ITaxonService.class).moveSynonymToAnotherTaxon(synRel,\r
                                this.element.getUuid(),\r
                                true,\r
                                synRel.getType(),\r
                                null,\r
                                null,\r
                                this.element.getUuid(),\r
                                true,\r
                                synRel.getType(),\r
                                null,\r
                                null,\r
-                               true).getCdmEntity();\r
+                               true);\r
                } catch (HomotypicalGroupChangeException e) {\r
                        // TODO Auto-generated catch block\r
                        e.printStackTrace();\r
                } catch (HomotypicalGroupChangeException e) {\r
                        // TODO Auto-generated catch block\r
                        e.printStackTrace();\r