cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Mon, 29 Jun 2020 14:56:02 +0000 (16:56 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Mon, 29 Jun 2020 16:26:56 +0000 (18:26 +0200)
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/CdmServiceInterceptorException.java
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/service/RemoteInvocationTermCacher.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractEntityCollectionElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/selection/EntitySelectionElement.java

index 005bf37ad02f6ce41a2d9b9b20b2f75dc2064fec..cb0ea35540fdac449e7633e05d490a313a9f4437 100644 (file)
@@ -1,3 +1,11 @@
+/**
+* Copyright (C) 2020 EDIT
+* 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.
+*/
 package eu.etaxonomy.taxeditor.service;
 
 public class CdmServiceInterceptorException extends RuntimeException {
index e64f8bc1d01f26ac4c43f9b74bcf5790828605c0..7808c477bc3b742b7ae4bc8db72ed5dedf8f3be0 100644 (file)
@@ -1,3 +1,11 @@
+/**
+* Copyright (C) 2020 EDIT
+* 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.
+*/
 package eu.etaxonomy.taxeditor.service;
 
 import java.util.HashMap;
index b8f0c20f6c616a65bdba1cded738caf40f343800..df7f77dcdf7934a54f3b76292aa0641e16cfa425 100644 (file)
@@ -37,9 +37,9 @@ import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
 
 /**
  * Visualizes an element of type ENTITY in an {@link AbstractEntityCollectionSection}
- *  and links listener functionalities to it.
+ * and links listener functionalities to it.
  *
- *  @param ENTITY the type of the element which is visualized by this class
+ * @param ENTITY the type of the element which is visualized by this class
  *
  * @author n.hoffmann
  * @created Nov 16, 2009
@@ -156,7 +156,6 @@ public abstract class AbstractEntityCollectionElement<ENTITY> extends
                setBackground(selected ? SELECTED : getPersistentBackground());
        }
 
-       /** {@inheritDoc} */
        @Override
        public void propertyChange(PropertyChangeEvent event) {
                if (event == null) {
@@ -170,7 +169,6 @@ public abstract class AbstractEntityCollectionElement<ENTITY> extends
 
        public abstract void handleEvent(Object eventSource);
 
-       /** {@inheritDoc} */
        @Override
     public void setBackground(Color color) {
            if(box.isDisposed() || container.isDisposed()){
@@ -192,12 +190,10 @@ public abstract class AbstractEntityCollectionElement<ENTITY> extends
 
        }
 
-       /** {@inheritDoc} */
        @Override
     public void widgetDefaultSelected(SelectionEvent e) {
        }
 
-       /** {@inheritDoc} */
        @Override
        public Composite getLayoutComposite() {
                return container;
@@ -221,7 +217,6 @@ public abstract class AbstractEntityCollectionElement<ENTITY> extends
                                "Parent element should be IConversationEnabled");
        }
 
-       /** {@inheritDoc} */
        @Override
     public void update(CdmDataChangeMap changeEvents) {
        }
index 98b83c18064b5a80479040e349b7b41470794675..294e390610a7bc6c7ea8cc60f80ee401a27a91b1 100644 (file)
@@ -452,7 +452,6 @@ public class EntitySelectionElement<T extends CdmBase> extends
                        this.selectionElement = selectionElement;\r
                }\r
 \r
-               /** {@inheritDoc} */\r
                @Override\r
                public void widgetSelected(SelectionEvent e) {\r
                        WizardDialog dialog = new WizardDialog(selectionElement.getShell(),\r
@@ -462,10 +461,10 @@ public class EntitySelectionElement<T extends CdmBase> extends
                                //if the edited entity has already been persisted\r
                                //but the transient entity is still set in this\r
                                //EntitySelectionElement, re-load it and set it\r
-                               IService<T> service = CdmStore.getService(entity);\r
-                               if(entity.getId()==0){\r
+                               if(!entity.isPersited()){\r
+                                   IService<T> service = CdmStore.getService(entity);\r
                                        T loadedEntity = service.load(entity.getUuid());\r
-                                       if(loadedEntity!=null){\r
+                                       if(loadedEntity != null){\r
                                                setEntity(loadedEntity);\r
                                        }\r
                                }\r
@@ -474,7 +473,6 @@ public class EntitySelectionElement<T extends CdmBase> extends
        }\r
 \r
        // not used\r
-       /** {@inheritDoc} */\r
        @Override\r
        public void widgetDefaultSelected(SelectionEvent e) {\r
        }\r