details:   https://code.openbravo.com/erp/devel/pi/rev/6f7c9f5a8186
changeset: 23081:6f7c9f5a8186
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Wed May 21 10:41:21 2014 +0200
summary:   Fixes issue 26643: Provides default implementation to avoid breaking 
the API

diffstat:

 
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java
 |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 299348a02b22 -r 6f7c9f5a8186 
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java
--- 
a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java
  Wed May 21 11:38:47 2014 +0530
+++ 
b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java
  Wed May 21 10:41:21 2014 +0200
@@ -154,7 +154,11 @@
    * Classes that extend TreeDatasourceService this method must implement this 
method to handle the
    * check if a node has children in a tree table
    */
-  protected abstract boolean nodeHasChildren(Entity entity, String nodeId, 
String hqlWhereClause);
+  protected boolean nodeHasChildren(Entity entity, String nodeId, String 
hqlWhereClause) {
+    // By default it returns true, so if the 'Don't allow to delete node if 
they have children'
+    // delete policy is selected, a node will be deletable only if this method 
is overwritten
+    return true;
+  }
 
   /**
    * Fetches some tree nodes Two operation modes:

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to