fix #6342: fix exception when using ? in selection dialog
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / operation / RemotingCdmOperation.java
index 8a856d27ed02fa59929c5728151e13b009430333..cf5dcd9839a80dbab74be1b3200bb33ab4ac4d0e 100644 (file)
@@ -1,4 +1,3 @@
-// $Id$
 /**
 * Copyright (C) 2015 EDIT
 * European Distributed Institute of Taxonomy
@@ -33,6 +32,7 @@ public abstract class RemotingCdmOperation extends AbstractOperation {
     private final Object source;
     private final Action action;
     private final boolean async;
+    protected Class entityType;
 
     public RemotingCdmOperation(String label, Action action, Object source, boolean async) {
         super(label);
@@ -66,8 +66,13 @@ public abstract class RemotingCdmOperation extends AbstractOperation {
 
     protected void fireDataChangeEvent(UpdateResult updateResult) {
         Set<CdmBase> updatedObjects = updateResult.getUpdatedObjects();
-        if(updatedObjects != null && !updatedObjects.isEmpty()) {
-            CdmApplicationState.getCurrentDataChangeService().fireChangeEvent(new CdmChangeEvent(action, updatedObjects, source.getClass()), async);
+        CdmApplicationState.getCurrentDataChangeService()
+            .fireChangeEvent(new CdmChangeEvent(action, updatedObjects, source.getClass(), entityType), async);
+    }
+
+    protected void fireDataChangeEvent(CdmBase cdmBase) {
+        if(cdmBase != null) {
+            CdmApplicationState.getCurrentDataChangeService().fireChangeEvent(new CdmChangeEvent(action, cdmBase, source.getClass()), async);
         }
     }