Use uuid based service method #5490
authorPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 23 Mar 2016 11:59:32 +0000 (12:59 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 23 Mar 2016 11:59:32 +0000 (12:59 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientNameService.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java

index 0516b1a428b2da1857d99325abb4a7136022d32b..9a85236c18668551ff3e583fe0997cae7d8c66f7 100644 (file)
@@ -293,8 +293,13 @@ public class TransientNameService implements INameService {
      * @see eu.etaxonomy.cdm.api.service.INameService#deleteTypeDesignation(eu.etaxonomy.cdm.model.name.TaxonNameBase, eu.etaxonomy.cdm.model.name.TypeDesignationBase)
      */
     @Override
-    public void deleteTypeDesignation(TaxonNameBase name, TypeDesignationBase typeDesignation) {
-        defaultService.deleteTypeDesignation(name, typeDesignation);
+    public DeleteResult deleteTypeDesignation(TaxonNameBase name, TypeDesignationBase typeDesignation) {
+        return defaultService.deleteTypeDesignation(name, typeDesignation);
+    }
+
+    @Override
+    public DeleteResult deleteTypeDesignation(UUID arg0, UUID arg1) {
+        return defaultService.deleteTypeDesignation(arg0, arg1);
     }
 
     /**
index d48891aa44c43070eb1a4ad766829937f3d7695f..da36085abfc0fe0b53d5ffc464a5f3b8c35a5e54 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 /**
 * Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
+* European Distributed Institute of Taxonomy
 * http://www.e-taxonomy.eu
-* 
+*
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
@@ -53,7 +53,7 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
                        ICdmFormElement parentElement, int style) {
                super(formFactory, conversation, parentElement, "Type Designations", style);
        }
-       
+
        /** {@inheritDoc} */
        @Override
        public void addElement(TypeDesignationBase element) {
@@ -96,7 +96,7 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
        public void removeElement(TypeDesignationBase element) {
                boolean removeTypeDesignationFromAllTypifiedNames = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES);
                TaxonNameBase entity = removeTypeDesignationFromAllTypifiedNames ? null : getEntity();
-               CdmStore.getService(INameService.class).deleteTypeDesignation(entity, element);
+               CdmStore.getService(INameService.class).deleteTypeDesignation(entity!=null?entity.getUuid():null, element!=null?element.getUuid():null);
        }
 
        /*
@@ -104,12 +104,13 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
         * @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
         */
        /** {@inheritDoc} */
-       public void setTaxonBase(TaxonBase entity) {
+       @Override
+    public void setTaxonBase(TaxonBase entity) {
                this.taxonBase = entity;
                NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(entity.getName());
                setEntity(name);
        }
-       
+
        private boolean isSpecimenType(){
                Rank rank = getEntity().getRank();
                return rank.isSpecies() || rank.isInfraSpecific();