You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2011/06/26 20:11:38 UTC

svn commit: r1139889 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Author: doogie
Date: Sun Jun 26 18:11:38 2011
New Revision: 1139889

URL: http://svn.apache.org/viewvc?rev=1139889&view=rev
Log:
OPTIMIZE: in createAlsoBoughtProductAssocs, move the
condition creation logic outside of the try/catch.

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1139889&r1=1139888&r2=1139889&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Sun Jun 26 18:11:38 2011
@@ -5586,13 +5586,13 @@ public class OrderServices {
                 Debug.logError(e, module);
             }
         }
+        List<EntityExpr> orderCondList = UtilMisc.toList(EntityCondition.makeCondition("orderTypeId", "SALES_ORDER"));
+        if (!processAllOrders && orderEntryFromDateTime != null) {
+            orderCondList.add(EntityCondition.makeCondition("entryDate", EntityOperator.GREATER_THAN, orderEntryFromDateTime));
+        }
+        EntityCondition cond = EntityCondition.makeCondition(orderCondList);
         EntityListIterator eli = null;
         try {
-            List<EntityExpr> orderCondList = UtilMisc.toList(EntityCondition.makeCondition("orderTypeId", "SALES_ORDER"));
-            if (!processAllOrders && orderEntryFromDateTime != null) {
-                orderCondList.add(EntityCondition.makeCondition("entryDate", EntityOperator.GREATER_THAN, orderEntryFromDateTime));
-            }
-            EntityCondition cond = EntityCondition.makeCondition(orderCondList);
             eli = delegator.find("OrderHeader", cond, null, null, UtilMisc.toList("entryDate ASC"), null);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);