[Tree Extension] Improve HQLWhereClauseForRootNodes feature
authorAugusto Mauch <augusto.mauch@openbravo.com>
Tue, 12 Nov 2013 17:49:25 +0100
changeset 22432 2a2e6a90a8fd
parent 22431 3aaf22ed37b0
child 22433 d61db5654f0f
[Tree Extension] Improve HQLWhereClauseForRootNodes feature
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/LinkToParentTreeDatasourceService.java
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java
src-db/database/model/tables/AD_TABLE_TREE.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_REF_LIST.xml
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/LinkToParentTreeDatasourceService.java	Tue Nov 12 15:55:08 2013 +0100
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/LinkToParentTreeDatasourceService.java	Tue Nov 12 17:49:25 2013 +0100
@@ -20,6 +20,7 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.businessUtility.Preferences;
+import org.openbravo.erpCommon.utility.PropertyException;
 import org.openbravo.model.ad.datamodel.Column;
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.domain.ReferencedTree;
@@ -170,8 +171,13 @@
       }
     }
 
-    // TODO: Do not apply always the whereclause on the children, make it configurable
-    if (hqlWhereClause != null) {
+    boolean allowNotApplyingWhereClauseToChildren = false;
+    try {
+      allowNotApplyingWhereClauseToChildren = "Y".equals(Preferences.getPreferenceValue(
+          "AllowNotApplyingWhereClauseToChildNodes", true, "0", "0", null, null, null));
+    } catch (PropertyException e) {
+    }
+    if ((fetchRoot || !allowNotApplyingWhereClauseToChildren) && hqlWhereClause != null) {
       whereClause.append(hqlWhereClause + " and ");
     }
 
@@ -295,7 +301,10 @@
     boolean isOrdered = tableTree.getTreeCategory().isOrdered();
 
     BaseOBObject bob = OBDal.getInstance().get(referencedEntity.getName(), nodeId);
-    BaseOBObject parentBob = OBDal.getInstance().get(referencedEntity.getName(), newParentId);
+    BaseOBObject parentBob = null;
+    if (!ROOT_NODE.equals(newParentId)) {
+      OBDal.getInstance().get(referencedEntity.getName(), newParentId);
+    }
     bob.set(linkToParentProperty.getName(), parentBob);
 
     OBDal.getInstance().flush();
@@ -305,7 +314,7 @@
 
     JSONObject updatedData = toJsonConverter.toJsonObject((BaseOBObject) bob,
         DataResolvingMode.FULL);
-    updatedData.put("parentId", parentBob.getId().toString());
+    updatedData.put("parentId", newParentId);
     updatedData.put("_hasChildren", (this.nodeHasChildren(entity, linkToParentProperty,
         nodeIdProperty, bob, hqlWhereClause)) ? true : false);
 
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java	Tue Nov 12 15:55:08 2013 +0100
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/TreeDatasourceService.java	Tue Nov 12 17:49:25 2013 +0100
@@ -22,6 +22,7 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.businessUtility.Preferences;
+import org.openbravo.erpCommon.utility.PropertyException;
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.domain.ReferencedTree;
 import org.openbravo.model.ad.ui.Tab;
@@ -240,34 +241,74 @@
           parameters);
     }
     try {
+
+      boolean allowNotApplyingWhereClauseToChildren = false;
+      try {
+        allowNotApplyingWhereClauseToChildren = "Y".equals(Preferences.getPreferenceValue(
+            "AllowNotApplyingWhereClauseToChildNodes", true, "0", "0", null, null, null));
+      } catch (PropertyException e) {
+      }
+
       Map<String, JSONObject> addedNodesMap = new HashMap<String, JSONObject>();
       for (String nodeId : filteredNodes) {
         JSONObject node = getJSONObjectByRecordId(parameters, nodeId);
 
         JSONObject savedNode = addedNodesMap.get(node.getString("id"));
-        if (savedNode == null) {
-          node.put("filterHit", true);
-          addedNodesMap.put(node.getString("id"), node);
+
+        if (hqlTreeWhereClauseRootNodes != null) {
+          Map<String, JSONObject> preAddedNodesMap = new HashMap<String, JSONObject>();
+          if (savedNode == null) {
+            node.put("filterHit", true);
+            preAddedNodesMap.put(node.getString("id"), node);
+          } else {
+            savedNode.put("filterHit", true);
+          }
+          while (node.has("parentId")
+              && !isRoot(node, hqlTreeWhereClauseRootNodes, tableTree)
+              && (allowNotApplyingWhereClauseToChildren || this.nodeConformsToWhereClause(
+                  tableTree, node.getString("parentId"), hqlTreeWhereClause))) {
+            nodeId = node.getString("parentId");
+            node = getJSONObjectByNodeId(parameters, nodeId);
+            savedNode = addedNodesMap.get(node.getString("id"));
+            if (savedNode == null) {
+              node.put("isOpen", true);
+              preAddedNodesMap.put(node.getString("id"), node);
+            } else {
+              savedNode.put("isOpen", true);
+            }
+          }
+          // We have to make sure that the filtered node was not aboute the
+          // root nodes as defined by the hqlTreeWhereClauseRootNodes
+          if (this.nodeConformsToWhereClause(tableTree, node.getString("id"),
+              hqlTreeWhereClauseRootNodes)) {
+            addedNodesMap.putAll(preAddedNodesMap);
+          }
         } else {
-          savedNode.put("filterHit", true);
+          if (savedNode == null) {
+            node.put("filterHit", true);
+            addedNodesMap.put(node.getString("id"), node);
+          } else {
+            savedNode.put("filterHit", true);
+          }
+          while (node.has("parentId")
+              && !ROOT_NODE.equals(node.get("parentId"))
+              && (allowNotApplyingWhereClauseToChildren || this.nodeConformsToWhereClause(
+                  tableTree, node.getString("parentId"), hqlTreeWhereClause))) {
+            nodeId = node.getString("parentId");
+            node = getJSONObjectByNodeId(parameters, nodeId);
+            savedNode = addedNodesMap.get(node.getString("id"));
+            if (savedNode == null) {
+              node.put("isOpen", true);
+              addedNodesMap.put(node.getString("id"), node);
+            } else {
+              savedNode.put("isOpen", true);
+            }
+          }
         }
 
-        while (node.has("parentId")
-            && !isRoot(node, hqlTreeWhereClauseRootNodes, tableTree)
-            && this.nodeConformsToWhereClause(tableTree, node.getString("parentId"),
+        if (allowNotApplyingWhereClauseToChildren
+            || this.nodeConformsToWhereClause(tableTree, node.getString("parentId"),
                 hqlTreeWhereClause)) {
-          nodeId = node.getString("parentId");
-          node = getJSONObjectByNodeId(parameters, nodeId);
-          savedNode = addedNodesMap.get(node.getString("id"));
-          if (savedNode == null) {
-            node.put("isOpen", true);
-            addedNodesMap.put(node.getString("id"), node);
-          } else {
-            savedNode.put("isOpen", true);
-          }
-        }
-        if (this.nodeConformsToWhereClause(tableTree, node.getString("parentId"),
-            hqlTreeWhereClause)) {
           node.put("parentId", ROOT_NODE);
         }
       }
@@ -294,10 +335,13 @@
       String parentId = null;
       nodeId = node.getString("id");
       parentId = node.getString("parentId");
+      if (ROOT_NODE.equals(parentId)) {
+        return true;
+      }
       if (hqlTreeWhereClauseRootNodes != null) {
         return nodeConformsToWhereClause(tableTree, nodeId, hqlTreeWhereClauseRootNodes);
       } else {
-        return ROOT_NODE.equals(parentId);
+        return false;
       }
     } catch (JSONException e) {
       return false;
--- a/src-db/database/model/tables/AD_TABLE_TREE.xml	Tue Nov 12 15:55:08 2013 +0100
+++ b/src-db/database/model/tables/AD_TABLE_TREE.xml	Tue Nov 12 17:49:25 2013 +0100
@@ -61,6 +61,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="APPLYWHERECLAUSETOCHILDNODES" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="AD_TABLETREE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -82,6 +86,7 @@
       <foreign-key foreignTable="AD_MODULE" name="AD_TABLTREE_AD_MODULE">
         <reference local="AD_MODULE_ID" foreign="AD_MODULE_ID"/>
       </foreign-key>
+      <check name="AD_TABLETREE_APPLYHQL_CHK"><![CDATA[APPLYWHERECLAUSETOCHILDNODES IN ('Y', 'N')]]></check>
       <check name="AD_TABLETREE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="AD_TABLETREE_MULTPAR_CHK"><![CDATA[HASMULTIPARENTNODES IN ('Y', 'N')]]></check>
     </table>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Tue Nov 12 15:55:08 2013 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Tue Nov 12 17:49:25 2013 +0100
@@ -311817,6 +311817,40 @@
 <!--CF75D269CF414461AB1CA3DF954E4EC3-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--CF75D269CF414461AB1CA3DF954E4EC3--></AD_COLUMN>
 
+<!--CFEC357F0AB44C9391E11AD519875C46--><AD_COLUMN>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <AD_COLUMN_ID><![CDATA[CFEC357F0AB44C9391E11AD519875C46]]></AD_COLUMN_ID>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <NAME><![CDATA[ApplyWhereClauseToChildNodes]]></NAME>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <COLUMNNAME><![CDATA[Applywhereclausetochildnodes]]></COLUMNNAME>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <AD_TABLE_ID><![CDATA[48F5363A7C0C44DE8114627C64DB4BDA]]></AD_TABLE_ID>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <DEFAULTVALUE><![CDATA[Y]]></DEFAULTVALUE>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <AD_ELEMENT_ID><![CDATA[55D679B1E25D4DDAAE1FE0216272170E]]></AD_ELEMENT_ID>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <POSITION><![CDATA[16]]></POSITION>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--CFEC357F0AB44C9391E11AD519875C46-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--CFEC357F0AB44C9391E11AD519875C46--></AD_COLUMN>
+
 <!--D0029DD2D6314D83BFE6141C3DBAA8E1--><AD_COLUMN>
 <!--D0029DD2D6314D83BFE6141C3DBAA8E1-->  <AD_COLUMN_ID><![CDATA[D0029DD2D6314D83BFE6141C3DBAA8E1]]></AD_COLUMN_ID>
 <!--D0029DD2D6314D83BFE6141C3DBAA8E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Nov 12 15:55:08 2013 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Nov 12 17:49:25 2013 +0100
@@ -23014,6 +23014,18 @@
 <!--557DE7C402C04DE9AFC02935F933FECC-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--557DE7C402C04DE9AFC02935F933FECC--></AD_ELEMENT>
 
+<!--55D679B1E25D4DDAAE1FE0216272170E--><AD_ELEMENT>
+<!--55D679B1E25D4DDAAE1FE0216272170E-->  <AD_ELEMENT_ID><![CDATA[55D679B1E25D4DDAAE1FE0216272170E]]></AD_ELEMENT_ID>
+<!--55D679B1E25D4DDAAE1FE0216272170E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--55D679B1E25D4DDAAE1FE0216272170E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--55D679B1E25D4DDAAE1FE0216272170E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--55D679B1E25D4DDAAE1FE0216272170E-->  <COLUMNNAME><![CDATA[Applywhereclausetochildnodes]]></COLUMNNAME>
+<!--55D679B1E25D4DDAAE1FE0216272170E-->  <NAME><![CDATA[Apply HQL Where Clause To Child Nodes]]></NAME>
+<!--55D679B1E25D4DDAAE1FE0216272170E-->  <PRINTNAME><![CDATA[Apply HQL Where Clause To Child Nodes]]></PRINTNAME>
+<!--55D679B1E25D4DDAAE1FE0216272170E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--55D679B1E25D4DDAAE1FE0216272170E-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--55D679B1E25D4DDAAE1FE0216272170E--></AD_ELEMENT>
+
 <!--560E22375F1DFE66E040007F01002367--><AD_ELEMENT>
 <!--560E22375F1DFE66E040007F01002367-->  <AD_ELEMENT_ID><![CDATA[560E22375F1DFE66E040007F01002367]]></AD_ELEMENT_ID>
 <!--560E22375F1DFE66E040007F01002367-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Tue Nov 12 15:55:08 2013 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Tue Nov 12 17:49:25 2013 +0100
@@ -191841,6 +191841,33 @@
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--39B39D8823BF4492A9FCD6075F33202F--></AD_FIELD>
 
+<!--39CACFEB349E473D9C222A78B77CFC72--><AD_FIELD>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <AD_FIELD_ID><![CDATA[39CACFEB349E473D9C222A78B77CFC72]]></AD_FIELD_ID>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <NAME><![CDATA[Apply HQL Where Clause To Child Nodes]]></NAME>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <AD_TAB_ID><![CDATA[708B2569E609493E818B5F6E1563A9A0]]></AD_TAB_ID>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <AD_COLUMN_ID><![CDATA[CFEC357F0AB44C9391E11AD519875C46]]></AD_COLUMN_ID>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <DISPLAYLOGIC><![CDATA[@AllowNotApplyingWhereClauseToChildNodes@='Y']]></DISPLAYLOGIC>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--39CACFEB349E473D9C222A78B77CFC72-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--39CACFEB349E473D9C222A78B77CFC72--></AD_FIELD>
+
 <!--39D31843123A4E9F8583357D90922A05--><AD_FIELD>
 <!--39D31843123A4E9F8583357D90922A05-->  <AD_FIELD_ID><![CDATA[39D31843123A4E9F8583357D90922A05]]></AD_FIELD_ID>
 <!--39D31843123A4E9F8583357D90922A05-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Nov 12 15:55:08 2013 +0100
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Nov 12 17:49:25 2013 +0100
@@ -8984,6 +8984,17 @@
 <!--474F41E63A2B4EE6B1321CCB24C14929-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--474F41E63A2B4EE6B1321CCB24C14929--></AD_REF_LIST>
 
+<!--47C166E5CA224A808DB986AF06BF8427--><AD_REF_LIST>
+<!--47C166E5CA224A808DB986AF06BF8427-->  <AD_REF_LIST_ID><![CDATA[47C166E5CA224A808DB986AF06BF8427]]></AD_REF_LIST_ID>
+<!--47C166E5CA224A808DB986AF06BF8427-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--47C166E5CA224A808DB986AF06BF8427-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--47C166E5CA224A808DB986AF06BF8427-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--47C166E5CA224A808DB986AF06BF8427-->  <VALUE><![CDATA[AllowNotApplyingWhereClauseToChildNodes]]></VALUE>
+<!--47C166E5CA224A808DB986AF06BF8427-->  <NAME><![CDATA[AllowNotApplyingWhereClauseToChildNodes]]></NAME>
+<!--47C166E5CA224A808DB986AF06BF8427-->  <AD_REFERENCE_ID><![CDATA[A26BA480E2014707B47257024C3CBFF7]]></AD_REFERENCE_ID>
+<!--47C166E5CA224A808DB986AF06BF8427-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--47C166E5CA224A808DB986AF06BF8427--></AD_REF_LIST>
+
 <!--47CA5ED6E40E4B27A0684ADDB04C5F85--><AD_REF_LIST>
 <!--47CA5ED6E40E4B27A0684ADDB04C5F85-->  <AD_REF_LIST_ID><![CDATA[47CA5ED6E40E4B27A0684ADDB04C5F85]]></AD_REF_LIST_ID>
 <!--47CA5ED6E40E4B27A0684ADDB04C5F85-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>