svn commit: r647413 - in /ofbiz/trunk/framework/webtools/webapp/webtools: WEB-INF/actions/entity/xmldsdump.bsh entity/xmldsrawdump.jsp

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r647413 - in /ofbiz/trunk/framework/webtools/webapp/webtools: WEB-INF/actions/entity/xmldsdump.bsh entity/xmldsrawdump.jsp

jleroux@apache.org
Author: jleroux
Date: Sat Apr 12 03:15:18 2008
New Revision: 647413

URL: http://svn.apache.org/viewvc?rev=647413&view=rev
Log:
A patch from Ray Barlow "XML export of a no-auto-stamp entity does not work" (https://issues.apache.org/jira/browse/OFBIZ-1728) - OFBIZ-1728

Modified:
    ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh
    ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsrawdump.jsp

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh?rev=647413&r1=647412&r2=647413&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/xmldsdump.bsh Sat Apr 12 03:15:18 2008
@@ -220,7 +220,13 @@
     
         boolean beganTransaction = TransactionUtil.begin(3600);
         try {
-            EntityListIterator values = delegator.findListIteratorByCondition(curEntityName, entityDateCond, null, null, UtilMisc.toList("-createdTxStamp"), efo);
+            ModelEntity me = reader.getModelEntity(curEntityName);
+            EntityListIterator values = null;
+            if (me.getNoAutoStamp() == true) {
+                values = delegator.findListIteratorByCondition(curEntityName, null, null, null, me.getPkFieldNames(), efo);
+            } else {
+                values = delegator.findListIteratorByCondition(curEntityName, entityDateCond, null, null, UtilMisc.toList("-createdTxStamp"), efo);
+            }
 
             GenericValue value = null;
             long curNumberWritten = 0;
@@ -275,7 +281,11 @@
                     results.add("["+fileNumber +"] [vvv] " + curEntityName + " skipping view entity");
                     continue;
                 }
-                values = delegator.findListIteratorByCondition(curEntityName, entityDateCond, null, null, me.getPkFieldNames(), efo);
+                if (me.getNoAutoStamp() == true) {
+                    values = delegator.findListIteratorByCondition(curEntityName, null, null, null, me.getPkFieldNames(), efo);
+                } else {
+                    values = delegator.findListIteratorByCondition(curEntityName, entityDateCond, null, null, me.getPkFieldNames(), efo);
+                }
                 boolean isFirst = true;
                 PrintWriter writer = null;
                 int fileSplitNumber = 1;

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsrawdump.jsp
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsrawdump.jsp?rev=647413&r1=647412&r2=647413&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsrawdump.jsp (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/entity/xmldsrawdump.jsp Sat Apr 12 03:15:18 2008
@@ -56,10 +56,17 @@
             try {
                 beganTransaction = TransactionUtil.begin();
 
-           Iterator i = passedEntityNames.iterator();
-             while(i.hasNext()) {
+                Iterator i = passedEntityNames.iterator();
+                while(i.hasNext()) {
                     String curEntityName = (String)i.next();
-                    EntityListIterator values = delegator.findListIteratorByCondition(curEntityName, entityDateCond, null, null);
+
+                    ModelEntity me = reader.getModelEntity(curEntityName);
+                    EntityListIterator values = null;
+                    if (me.getNoAutoStamp() == true) {
+                        values = delegator.findListIteratorByCondition(curEntityName, null, null, null);
+                    } else {
+                        values = delegator.findListIteratorByCondition(curEntityName, entityDateCond, null, null);
+                    }
 
                     GenericValue value = null;
                     while ((value = (GenericValue) values.next()) != null) {