svn commit: r660843 [4/7] - in /ofbiz/trunk/applications: accounting/src/org/ofbiz/accounting/finaccount/ accounting/src/org/ofbiz/accounting/invoice/ accounting/src/org/ofbiz/accounting/payment/ accounting/src/org/ofbiz/accounting/tax/ accounting/weba...

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

svn commit: r660843 [4/7] - in /ofbiz/trunk/applications: accounting/src/org/ofbiz/accounting/finaccount/ accounting/src/org/ofbiz/accounting/invoice/ accounting/src/org/ofbiz/accounting/payment/ accounting/src/org/ofbiz/accounting/tax/ accounting/weba...

jonesde
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderlist.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderlist.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderlist.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderlist.bsh Wed May 28 00:22:59 2008
@@ -39,11 +39,11 @@
 hasPermission = false;
 if (state.hasType("view_SALES_ORDER") && security.hasEntityPermission("ORDERMGR", "_VIEW", session)) {
     hasPermission = true;
-    salesOrdersCondition = new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER");
+    salesOrdersCondition = EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER");
 }
 if (state.hasType("view_PURCHASE_ORDER") && security.hasEntityPermission("ORDERMGR", "_PURCHASE_VIEW", session)) {
     hasPermission = true;
-    purchaseOrdersCondition = new EntityExpr("orderTypeId", EntityOperator.EQUALS, "PURCHASE_ORDER");
+    purchaseOrdersCondition = EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "PURCHASE_ORDER");
 }
 context.put("hasPermission", hasPermission);
 

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderstats.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderstats.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderstats.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderstats.bsh Wed May 28 00:22:59 2008
@@ -65,10 +65,10 @@
 Timestamp yearBegin = new Timestamp(cal.getTime().getTime());      
   
 // order status report
-EntityConditionList ecl = new EntityConditionList(UtilMisc.toList(
-                                new EntityExpr("orderItemSeqId", EntityOperator.EQUALS, null),
-                                new EntityExpr("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
-                                new EntityExpr("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin)),
+EntityConditionList ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                                EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null),
+                                EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
+                                EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin)),
                             EntityOperator.AND);
 List dayList = delegator.findList("OrderStatus", ecl, null, null, null, false);
 context.put("dayOrder", EntityUtil.filterByAnd(dayList, UtilMisc.toMap("statusId", "ORDER_ORDERED")));
@@ -77,10 +77,10 @@
 context.put("dayCancelled", EntityUtil.filterByAnd(dayList, UtilMisc.toMap("statusId", "ORDER_CANCELLED")));
 context.put("dayRejected", EntityUtil.filterByAnd(dayList, UtilMisc.toMap("statusId", "ORDER_REJECTED")));
   
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("orderItemSeqId", EntityOperator.EQUALS, null),
-                        new EntityExpr("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
-                        new EntityExpr("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin)),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null),
+                        EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin)),
                     EntityOperator.AND);
 List weekList = delegator.findList("OrderStatus", ecl, null, null, null, false);
 context.put("weekOrder", EntityUtil.filterByAnd(weekList, UtilMisc.toMap("statusId", "ORDER_ORDERED")));
@@ -89,10 +89,10 @@
 context.put("weekCancelled", EntityUtil.filterByAnd(weekList, UtilMisc.toMap("statusId", "ORDER_CANCELLED")));
 context.put("weekRejected", EntityUtil.filterByAnd(weekList, UtilMisc.toMap("statusId", "ORDER_REJECTED")));
   
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("orderItemSeqId", EntityOperator.EQUALS, null),
-                        new EntityExpr("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
-                        new EntityExpr("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin)),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null),
+                        EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin)),
                     EntityOperator.AND);
 List monthList = delegator.findList("OrderStatus", ecl, null, null, null, false);
 context.put("monthOrder", EntityUtil.filterByAnd(monthList, UtilMisc.toMap("statusId", "ORDER_ORDERED")));
@@ -101,10 +101,10 @@
 context.put("monthCancelled", EntityUtil.filterByAnd(monthList, UtilMisc.toMap("statusId", "ORDER_CANCELLED")));
 context.put("monthRejected", EntityUtil.filterByAnd(monthList, UtilMisc.toMap("statusId", "ORDER_REJECTED")));
   
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("orderItemSeqId", EntityOperator.EQUALS, null),
-                        new EntityExpr("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
-                        new EntityExpr("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin)),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, null),
+                        EntityCondition.makeCondition("orderPaymentPreferenceId", EntityOperator.EQUALS, null),
+                        EntityCondition.makeCondition("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin)),
                     EntityOperator.AND);
 List yearList = delegator.findList("OrderStatus", ecl, null, null, null, false);
 context.put("yearOrder", EntityUtil.filterByAnd(yearList, UtilMisc.toMap("statusId", "ORDER_ORDERED")));
@@ -114,20 +114,20 @@
 context.put("yearRejected", EntityUtil.filterByAnd(yearList, UtilMisc.toMap("statusId", "ORDER_REJECTED")));
   
 // order totals and item counts
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
-                        new EntityExpr("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
-                        new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin),
-                        new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
+                        EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin),
+                        EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
                     EntityOperator.AND);
 List dayItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
 List dayItemsPending = EntityUtil.filterByAnd(dayItems, UtilMisc.toMap("itemStatusId", "ITEM_ORDERED"));
 
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
-                        new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
-                        new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin),
-                        new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
+                        EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, dayBegin),
+                        EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
                     EntityOperator.AND);
 List dayHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
 List dayHeadersPending = EntityUtil.filterByAnd(dayHeaders, UtilMisc.toMap("statusId", "ORDER_ORDERED"));  
@@ -145,20 +145,20 @@
 context.put("dayItemTotalPaid", dayItemTotalPaid);
 context.put("dayItemCountPaid", dayItemCountPaid);
 
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
-                        new EntityExpr("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
-                        new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin),
-                        new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
+                        EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin),
+                        EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
                     EntityOperator.AND);
 List weekItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
 List weekItemsPending = EntityUtil.filterByAnd(weekItems, UtilMisc.toMap("itemStatusId", "ITEM_ORDERED"));
 
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
-                        new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
-                        new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin),
-                        new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
+                        EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin),
+                        EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
                     EntityOperator.AND);
 List weekHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
 List weekHeadersPending = EntityUtil.filterByAnd(weekHeaders, UtilMisc.toMap("statusId", "ORDER_ORDERED"));
@@ -176,20 +176,20 @@
 context.put("weekItemTotalPaid", weekItemTotalPaid);
 context.put("weekItemCountPaid", weekItemCountPaid);
 
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
-                        new EntityExpr("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
-                        new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin),
-                        new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
+                        EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin),
+                        EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
                     EntityOperator.AND);
 List monthItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
 List monthItemsPending = EntityUtil.filterByAnd(monthItems, UtilMisc.toMap("itemStatusId", "ITEM_ORDERED"));
 
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
-                        new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
-                        new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin),
-                        new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
+                        EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin),
+                        EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
                     EntityOperator.AND);
 List monthHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
 List monthHeadersPending = EntityUtil.filterByAnd(monthHeaders, UtilMisc.toMap("statusId", "ORDER_ORDERED"));  
@@ -207,20 +207,20 @@
 context.put("monthItemTotalPaid", monthItemTotalPaid);
 context.put("monthItemCountPaid", monthItemCountPaid);
   
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
-                        new EntityExpr("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
-                        new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin),
-                        new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"),
+                        EntityCondition.makeCondition("itemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin),
+                        EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
                     EntityOperator.AND);
 List yearItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
 List yearItemsPending = EntityUtil.filterByAnd(yearItems, UtilMisc.toMap("itemStatusId", "ITEM_ORDERED"));
   
-ecl = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
-                        new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
-                        new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin),
-                        new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
+ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
+                        EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
+                        EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin),
+                        EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER")),
                     EntityOperator.AND);
 List yearHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
 List yearHeadersPending = EntityUtil.filterByAnd(yearHeaders, UtilMisc.toMap("statusId", "ORDER_ORDERED"));

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh Wed May 28 00:22:59 2008
@@ -168,9 +168,9 @@
     }
     context.put("invoices", allInvoices);
 
-    EntityConditionList ecl = new EntityConditionList(UtilMisc.toList(
-                                    new EntityExpr("orderId", EntityOperator.EQUALS, orderId),
-                                    new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")),
+    EntityConditionList ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                                    EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderId),
+                                    EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")),
                                 EntityOperator.AND);
     orderPaymentPreferences = delegator.findList("OrderPaymentPreference", ecl, null, null, null, false);
     context.put("orderPaymentPreferences", orderPaymentPreferences);
@@ -180,7 +180,7 @@
     context.put("shipGroups", shipGroups);
 
     // get Shipment tracking info
-    osisCond = new EntityFieldMap(UtilMisc.toMap("orderId", orderId), EntityOperator.AND);
+    osisCond = EntityCondition.makeCondition(UtilMisc.toMap("orderId", orderId), EntityOperator.AND);
     osisOrder = UtilMisc.toList("shipmentId", "shipmentRouteSegmentId", "shipmentPackageSeqId");
     osisFields = UtilMisc.toSet("shipGroupSeqId", "shipmentId", "shipmentRouteSegmentId", "carrierPartyId", "shipmentMethodTypeId");
     osisFields.add("shipmentPackageSeqId"); osisFields.add("trackingCode"); osisFields.add("boxNumber");
@@ -246,7 +246,7 @@
     // see if an approved order with all items completed exists
     context.put("setOrderCompleteOption", false);
     if ("ORDER_APPROVED".equals(orderHeader.getString("statusId"))) {
-        expr = new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ITEM_COMPLETED");
+        expr = EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ITEM_COMPLETED");
         notCreatedItems = orderReadHelper.getOrderItemsByCondition(expr);
         if (notCreatedItems.size() == 0) {
             context.put("setOrderCompleteOption", true);

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/receivepayment.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/receivepayment.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/receivepayment.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/receivepayment.bsh Wed May 28 00:22:59 2008
@@ -23,7 +23,7 @@
 
 delegator = request.getAttribute("delegator");
 orderId = request.getParameter("orderId");
-paymentMethodTypes = delegator.findList("PaymentMethodType", new EntityExpr("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE"), null, null, null, false);
+paymentMethodTypes = delegator.findList("PaymentMethodType", EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE"), null, null, null, false);
 context.put("paymentMethodTypes", paymentMethodTypes);
     
 workEffortId = request.getParameter("workEffortId");

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh Wed May 28 00:22:59 2008
@@ -37,17 +37,17 @@
 
 
 // search by orderTypeId is mandatory
-conditions = UtilMisc.toList(new EntityExpr("orderTypeId", EntityOperator.EQUALS, orderTypeId));
+conditions = UtilMisc.toList(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, orderTypeId));
 
 if (UtilValidate.isDate(fromOrderDate) && UtilValidate.isNotEmpty(fromOrderDate)){
-    conditions.add(new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromOrderDate));
+    conditions.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromOrderDate));
 }
 if (UtilValidate.isDate(thruOrderDate) && UtilValidate.isNotEmpty(thruOrderDate)){
-    conditions.add(new EntityExpr("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, thruOrderDate));
+    conditions.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, thruOrderDate));
 }
 
 if (productStoreId != null && productStoreId.length() > 0) {
-    conditions.add(new EntityExpr("productStoreId", EntityOperator.EQUALS, productStoreId));
+    conditions.add(EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId));
     // for generating a title (given product store)
     context.put("productStore", delegator.findByPrimaryKeyCache("ProductStore", UtilMisc.toMap("productStoreId", productStoreId)));
 } else {
@@ -55,25 +55,25 @@
     context.put("productStore", UtilMisc.toMap("storeName", "All Stores"));
 }
 if (orderStatusId != null && orderStatusId.length() > 0) {
-    conditions.add(new EntityExpr("orderStatusId", EntityOperator.EQUALS, orderStatusId));
+    conditions.add(EntityCondition.makeCondition("orderStatusId", EntityOperator.EQUALS, orderStatusId));
 } else {
     // search all orders that are not completed, cancelled or rejected
     conditions.add(
-            new EntityConditionList( UtilMisc.toList(
-                    new EntityExpr("orderStatusId", EntityOperator.NOT_EQUAL, "ORDER_COMPLETED"),
-                    new EntityExpr("orderStatusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
-                    new EntityExpr("orderStatusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED")
+            EntityCondition.makeCondition( UtilMisc.toList(
+                    EntityCondition.makeCondition("orderStatusId", EntityOperator.NOT_EQUAL, "ORDER_COMPLETED"),
+                    EntityCondition.makeCondition("orderStatusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
+                    EntityCondition.makeCondition("orderStatusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED")
                     ), EntityOperator.AND)
             );
 }
 
 // item conditions
-conditions.add(new EntityExpr("orderItemStatusId", EntityOperator.NOT_EQUAL, "ITEM_COMPLETED"));
-conditions.add(new EntityExpr("orderItemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"));
-conditions.add(new EntityExpr("orderItemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"));
+conditions.add(EntityCondition.makeCondition("orderItemStatusId", EntityOperator.NOT_EQUAL, "ITEM_COMPLETED"));
+conditions.add(EntityCondition.makeCondition("orderItemStatusId", EntityOperator.NOT_EQUAL, "ITEM_CANCELLED"));
+conditions.add(EntityCondition.makeCondition("orderItemStatusId", EntityOperator.NOT_EQUAL, "ITEM_REJECTED"));
 
 // get the results as an entity list iterator
-allConditions = new EntityConditionList( conditions, EntityOperator.AND );
+allConditions = EntityCondition.makeCondition( conditions, EntityOperator.AND );
 fieldsToSelect = UtilMisc.toSet("orderId", "orderDate", "productId", "quantityOrdered", "quantityIssued", "quantityOpen");
 fieldsToSelect.add("shipBeforeDate");
 fieldsToSelect.add("shipAfterDate");
@@ -100,8 +100,8 @@
     shipAfterDate = listValue.get("shipAfterDate");
     shipBeforeDate = listValue.get("shipBeforeDate");    
     fieldsToSelect = UtilMisc.toSet("price","productPriceTypeId");
-    productIdCondExpr =  UtilMisc.toList(new EntityExpr("productId", EntityOperator.EQUALS, productId));    
-    prodPriceCond = new EntityConditionList(productIdCondExpr, EntityOperator.AND);    
+    productIdCondExpr =  UtilMisc.toList(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId));    
+    prodPriceCond = EntityCondition.makeCondition(productIdCondExpr, EntityOperator.AND);    
     productPrices = delegator.findList("ProductPrice", prodPriceCond, fieldsToSelect, null, null, false);    
     Double costPrice = new Double(0.0);
     Double retailPrice = new Double(0.0);

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirementsByVendor.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirementsByVendor.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirementsByVendor.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirementsByVendor.bsh Wed May 28 00:22:59 2008
@@ -34,10 +34,10 @@
 fields = UtilMisc.toSet("partyId", "productId");
 options = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
 orderBy = UtilMisc.toList("partyId");
-conditions = new EntityConditionList( UtilMisc.toList(
-            new EntityExpr("roleTypeId", EntityOperator.EQUALS, "SUPPLIER"),
-            new EntityExpr("statusId", EntityOperator.EQUALS, "REQ_APPROVED"),
-            new EntityExpr("requirementTypeId", EntityOperator.EQUALS, "PRODUCT_REQUIREMENT"),
+conditions = EntityCondition.makeCondition( UtilMisc.toList(
+            EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "SUPPLIER"),
+            EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "REQ_APPROVED"),
+            EntityCondition.makeCondition("requirementTypeId", EntityOperator.EQUALS, "PRODUCT_REQUIREMENT"),
             EntityUtil.getFilterByDateExpr()
             ), EntityOperator.AND);
 requirements = delegator.find("RequirementPartyProductCount", conditions, null, fields, orderBy, options);

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/selectCreatedProposed.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/selectCreatedProposed.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/selectCreatedProposed.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/selectCreatedProposed.bsh Wed May 28 00:22:59 2008
@@ -24,13 +24,13 @@
 import org.ofbiz.entity.condition.EntityOperator;
 
 Map prepare = dispatcher.runSync("prepareFind", UtilMisc.toMap("inputFields", parameters, "entityName", "Requirement"));
-EntityConditionList statusCondition = new EntityConditionList(
-                    UtilMisc.toList(new EntityExpr("statusId", EntityOperator.EQUALS, "REQ_CREATED"),
-                                    new EntityExpr("statusId", EntityOperator.EQUALS, "REQ_PROPOSED")),
+EntityConditionList statusCondition = EntityCondition.makeCondition(
+                    UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "REQ_CREATED"),
+                                    EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "REQ_PROPOSED")),
                     EntityOperator.OR);
 EntityConditionList ecl = null;
 if (UtilValidate.isNotEmpty(prepare.get("entityConditionList"))) {
-    ecl = new EntityConditionList(UtilMisc.toList((EntityConditionList)prepare.get("entityConditionList"),
+    ecl = EntityCondition.makeCondition(UtilMisc.toList((EntityConditionList)prepare.get("entityConditionList"),
                                                    statusCondition),
                                   EntityOperator.AND);
 } else {

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/task/ordertasklist.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/task/ordertasklist.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/task/ordertasklist.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/task/ordertasklist.bsh Wed May 28 00:22:59 2008
@@ -41,10 +41,10 @@
     }
 }
 
-partyBase = UtilMisc.toList(new EntityExpr("statusId", EntityOperator.EQUALS, "CAL_ACCEPTED"), new EntityExpr("wepaPartyId", EntityOperator.EQUALS, userLogin.getString("partyId")));
-partyRole = UtilMisc.toList(new EntityExpr("orderRoleTypeId", EntityOperator.EQUALS, "PLACING_CUSTOMER"), new EntityExpr("orderRoleTypeId", EntityOperator.EQUALS, "SUPPLIER_AGENT"));
-partyExpr = UtilMisc.toList(new EntityConditionList(partyBase, EntityOperator.AND), new EntityConditionList(partyRole, EntityOperator.OR));
-partyCond = new EntityConditionList(partyExpr, EntityOperator.AND);
+partyBase = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "CAL_ACCEPTED"), EntityCondition.makeCondition("wepaPartyId", EntityOperator.EQUALS, userLogin.getString("partyId")));
+partyRole = UtilMisc.toList(EntityCondition.makeCondition("orderRoleTypeId", EntityOperator.EQUALS, "PLACING_CUSTOMER"), EntityCondition.makeCondition("orderRoleTypeId", EntityOperator.EQUALS, "SUPPLIER_AGENT"));
+partyExpr = UtilMisc.toList(EntityCondition.makeCondition(partyBase, EntityOperator.AND), EntityCondition.makeCondition(partyRole, EntityOperator.OR));
+partyCond = EntityCondition.makeCondition(partyExpr, EntityOperator.AND);
 partyTasks = delegator.findList("OrderTaskList", partyCond, null, sortOrder, null, false);
 
 if (partyTasks != null) partyTasks = EntityUtil.filterByDate(partyTasks);
@@ -68,16 +68,16 @@
 while (pri.hasNext()) {
     partyRole = (GenericValue) pri.next();
     if (!partyRole.getString("roleTypeId").equals("_NA_"))
-        pRolesList.add(new EntityExpr("roleTypeId", EntityOperator.EQUALS, partyRole.getString("roleTypeId")));
+        pRolesList.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, partyRole.getString("roleTypeId")));
 }
 
-custList = UtilMisc.toList(new EntityExpr("orderRoleTypeId", EntityOperator.EQUALS, "PLACING_CUSTOMER"), new EntityExpr("orderRoleTypeId", EntityOperator.EQUALS, "SUPPLIER_AGENT"));
-baseList = UtilMisc.toList(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "CAL_CANCELLED"), new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "CAL_COMPLETED"), new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "CAL_DELEGATED"));
+custList = UtilMisc.toList(EntityCondition.makeCondition("orderRoleTypeId", EntityOperator.EQUALS, "PLACING_CUSTOMER"), EntityCondition.makeCondition("orderRoleTypeId", EntityOperator.EQUALS, "SUPPLIER_AGENT"));
+baseList = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "CAL_CANCELLED"), EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "CAL_COMPLETED"), EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "CAL_DELEGATED"));
 expressions = new LinkedList();
-if (custList.size() > 0) expressions.add(new EntityConditionList(custList, EntityOperator.OR));
-if (pRolesList.size() > 0) expressions.add(new EntityConditionList(pRolesList, EntityOperator.OR));
-if (baseList.size() > 0) expressions.add(new EntityConditionList(baseList, EntityOperator.AND));
-conditions = new EntityConditionList(expressions, EntityOperator.AND);
+if (custList.size() > 0) expressions.add(EntityCondition.makeCondition(custList, EntityOperator.OR));
+if (pRolesList.size() > 0) expressions.add(EntityCondition.makeCondition(pRolesList, EntityOperator.OR));
+if (baseList.size() > 0) expressions.add(EntityCondition.makeCondition(baseList, EntityOperator.AND));
+conditions = EntityCondition.makeCondition(expressions, EntityOperator.AND);
     
 // invoke the query
 roleTasks = delegator.findList("OrderTaskList", conditions, null, sortOrder, null, false);    

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.bsh Wed May 28 00:22:59 2008
@@ -83,12 +83,12 @@
 
 conditionList = new LinkedList();
 if (fromDate != null) {
-    conditionList.add(new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
+    conditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
 }
 if (toDate != null) {
-    conditionList.add(new EntityExpr("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, toDate));
+    conditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, toDate));
 }
-entityCondition = new EntityConditionList(conditionList, EntityOperator.AND);
+entityCondition = EntityCondition.makeCondition(conditionList, EntityOperator.AND);
 orderByList = UtilMisc.toList("orderTypeId", "orderStatus");
 
 eli = delegator.find("OrderReportView", entityCondition, null, null, orderByList, null);

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Wed May 28 00:22:59 2008
@@ -21,6 +21,8 @@
 
 import java.util.*;
 
+import javolution.util.FastList;
+
 import org.ofbiz.base.util.*;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
@@ -50,7 +52,7 @@
         String communicationEventId = (String) context.get("communicationEventId");
         
         Map result = ServiceUtil.returnSuccess();
-        List errorMessages = new LinkedList(); // used to keep a list of all error messages returned from sending emails to contact list
+        List errorMessages = FastList.newInstance(); // used to keep a list of all error messages returned from sending emails to contact list
         
         try {
             // find the communication event and make sure that it is actually an email
@@ -180,12 +182,12 @@
             // Find a list of distinct email addresses from active, ACCEPTED parties in the contact list
             //      using a list iterator (because there can be a large number)
             List<EntityCondition> conditionList = UtilMisc.toList(
-                        new EntityExpr("contactListId", EntityOperator.EQUALS, contactList.get("contactListId")),
-                        new EntityExpr("statusId", EntityOperator.EQUALS, "CLPT_ACCEPTED"),
-                        new EntityExpr("preferredContactMechId", EntityOperator.NOT_EQUAL, null),
+                        EntityCondition.makeCondition("contactListId", EntityOperator.EQUALS, contactList.get("contactListId")),
+                        EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "CLPT_ACCEPTED"),
+                        EntityCondition.makeCondition("preferredContactMechId", EntityOperator.NOT_EQUAL, null),
                         EntityUtil.getFilterByDateExpr(), EntityUtil.getFilterByDateExpr("contactFromDate", "contactThruDate")
                         );
-            EntityConditionList<EntityCondition> conditions = new EntityConditionList<EntityCondition>(conditionList, EntityOperator.AND);
+            EntityConditionList<EntityCondition> conditions = EntityCondition.makeCondition(conditionList, EntityOperator.AND);
             Set<String> fieldsToSelect = UtilMisc.toSet("infoString");
 
             List sendToEmails = delegator.findList("ContactListPartyAndContactMech", conditions, fieldsToSelect, null,
@@ -219,8 +221,8 @@
                     //      need to retrieve the partyId it's related to. Since this could be multiple parties, get
                     //      only the most recent valid one via ContactListPartyAndContactMech.
                     List clpConditionList = new ArrayList(conditionList);
-                    clpConditionList.add(new EntityExpr("infoString", EntityOperator.EQUALS, emailAddress));
-                    EntityConditionList clpConditions = new EntityConditionList(clpConditionList, EntityOperator.AND);
+                    clpConditionList.add(EntityCondition.makeCondition("infoString", EntityOperator.EQUALS, emailAddress));
+                    EntityConditionList clpConditions = EntityCondition.makeCondition(clpConditionList, EntityOperator.AND);
     
                     List emailCLPaCMs = delegator.findList("ContactListPartyAndContactMech", clpConditions, null, orderBy, null, true);
                     GenericValue lastContactListPartyACM = EntityUtil.getFirst(emailCLPaCMs);

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Wed May 28 00:22:59 2008
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 
 package org.ofbiz.party.party;
 
@@ -29,6 +29,7 @@
 import java.util.Map;
 
 import javolution.util.FastList;
+
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
@@ -50,10 +51,10 @@
 import org.ofbiz.entity.util.EntityTypeUtil;
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.GenericServiceException;
+import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.service.ModelService;
 import org.ofbiz.service.ServiceUtil;
-import org.ofbiz.service.LocalDispatcher;
-import org.ofbiz.service.GenericServiceException;
 
 /**
  * Services for Party/Person/Group maintenance
@@ -652,7 +653,7 @@
         }
 
         try {
-            EntityExpr ee = new EntityExpr(new EntityFunction.UPPER(new EntityFieldValue("infoString")), EntityOperator.EQUALS, new EntityFunction.UPPER(email.toUpperCase()));
+            EntityExpr ee = EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("infoString"), EntityOperator.EQUALS, EntityFunction.UPPER(email.toUpperCase()));
             List c = EntityUtil.filterByDate(delegator.findList("PartyAndContactMech", ee, null, UtilMisc.toList("infoString"), null, false), true);
 
             if (Debug.verboseOn()) Debug.logVerbose("List: " + c, module);
@@ -691,7 +692,7 @@
         }
 
         try {
-            EntityExpr ee = new EntityExpr(new EntityFunction.UPPER(new EntityFieldValue("infoString")), EntityOperator.LIKE, new EntityFunction.UPPER(("%" + email.toUpperCase()) + "%"));
+            EntityExpr ee = EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("infoString"), EntityOperator.LIKE, EntityFunction.UPPER(("%" + email.toUpperCase()) + "%"));
             List c = EntityUtil.filterByDate(delegator.findList("PartyAndContactMech", ee, null, UtilMisc.toList("infoString"), null, false), true);
 
             if (Debug.verboseOn()) Debug.logVerbose("List: " + c, module);
@@ -734,7 +735,7 @@
             return ServiceUtil.returnError("Required parameter 'userLoginId' cannot be empty.");
 
         try {
-            EntityExpr ee = new EntityExpr(new EntityFunction.UPPER(new EntityFieldValue("userLoginId")), EntityOperator.LIKE, new EntityFunction.UPPER("%" + userLoginId.toUpperCase() + "%"));
+            EntityExpr ee = EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("userLoginId"), EntityOperator.LIKE, EntityFunction.UPPER("%" + userLoginId.toUpperCase() + "%"));
             Collection ulc = delegator.findList("PartyAndUserLogin", ee, null, UtilMisc.toList("userloginId"), null, false);
 
             if (Debug.verboseOn()) Debug.logVerbose("Collection: " + ulc, module);
@@ -786,10 +787,9 @@
         }
 
         try {
-            EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(UtilMisc.toList(
-                    new EntityExpr(new EntityFunction.UPPER(new EntityFieldValue("firstName")), EntityOperator.LIKE, new EntityFunction.UPPER("%" + firstName.toUpperCase() + "%")),
-                    new EntityExpr(new EntityFunction.UPPER(new EntityFieldValue("lastName")), EntityOperator.LIKE, new EntityFunction.UPPER("%" + lastName.toUpperCase() + "%"))),
-                    EntityOperator.AND);
+            EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(EntityOperator.AND,
+                    EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("firstName"), EntityOperator.LIKE, EntityFunction.UPPER("%" + firstName.toUpperCase() + "%")),
+                    EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("lastName"), EntityOperator.LIKE, EntityFunction.UPPER("%" + lastName.toUpperCase() + "%")));
             Collection pc = delegator.findList("Person", ecl, null, UtilMisc.toList("lastName", "firstName", "partyId"), null, false);
 
             if (Debug.infoOn()) Debug.logInfo("PartyFromPerson number found: " + pc.size(), module);
@@ -832,7 +832,7 @@
         }
 
         try {
-            EntityExpr ee = new EntityExpr(new EntityFunction.UPPER(new EntityFieldValue("groupName")), EntityOperator.LIKE, new EntityFunction.UPPER("%" + groupName.toUpperCase() + "%"));
+            EntityExpr ee = EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("groupName"), EntityOperator.LIKE, EntityFunction.UPPER("%" + groupName.toUpperCase() + "%"));
             Collection pc = delegator.findList("PartyGroup", ee, null, UtilMisc.toList("groupName", "partyId"), null, false);
 
             if (Debug.infoOn()) Debug.logInfo("PartyFromGroup number found: " + pc.size(), module);
@@ -1060,7 +1060,10 @@
                 paramList = paramList + "&partyIdFrom=" + partyIdFrom;
                 dynamicView.addAlias("PR", "partyIdFrom");
                 // add the expr
-                andExprs.add(new EntityExpr(new EntityExpr("partyIdFrom", true, EntityOperator.EQUALS, partyIdFrom, true), EntityOperator.AND, new EntityExpr("partyRelationshipTypeId", true, EntityOperator.EQUALS, partyRelationshipTypeId, true)));
+                andExprs.add(EntityCondition.makeCondition(
+                        EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("partyIdFrom"), EntityOperator.EQUALS, EntityFunction.UPPER(partyIdFrom)),
+                        EntityOperator.AND,
+                        EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("partyRelationshipTypeId"), EntityOperator.EQUALS, EntityFunction.UPPER(partyRelationshipTypeId))));
                 fieldsToSelect.add("partyIdTo");
             }
             
@@ -1076,23 +1079,23 @@
                 // check for a partyId
                 if (partyId != null && partyId.length() > 0) {
                     paramList = paramList + "&partyId=" + partyId;
-                    andExprs.add(new EntityExpr("partyId", true, EntityOperator.LIKE, "%"+partyId+"%", true));
+                    andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("partyId"), EntityOperator.LIKE, EntityFunction.UPPER("%"+partyId+"%")));
                 }
 
                 // now the statusId - send ANY for all statuses; leave null for just enabled; or pass a specific status
                 if (statusId != null) {
                     paramList = paramList + "&statusId=" + statusId;
                     if (!"ANY".equalsIgnoreCase(statusId)) {
-                        andExprs.add(new EntityExpr("statusId", EntityOperator.EQUALS, statusId));
+                        andExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, statusId));
                     }
                 } else {
                     // NOTE: _must_ explicitly allow null as it is not included in a not equal in many databases... odd but true
-                    andExprs.add(new EntityExpr(new EntityExpr("statusId", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "PARTY_DISABLED")));
+                    andExprs.add(EntityCondition.makeCondition(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PARTY_DISABLED")));
                 }
                 // check for partyTypeId
                 if (partyTypeId != null && !"ANY".equals(partyTypeId)) {
                     paramList = paramList + "&partyTypeId=" + partyTypeId;
-                    andExprs.add(new EntityExpr("partyTypeId", true, EntityOperator.LIKE, "%"+partyTypeId+"%", true));
+                    andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("partyTypeId"), EntityOperator.LIKE, EntityFunction.UPPER("%"+partyTypeId+"%")));
                 }
 
                 // ----
@@ -1109,7 +1112,7 @@
                     dynamicView.addViewLink("PT", "UL", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
 
                     // add the expr
-                    andExprs.add(new EntityExpr("userLoginId", true, EntityOperator.LIKE, "%"+userLoginId+"%", true));
+                    andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("userLoginId"), EntityOperator.LIKE, EntityFunction.UPPER("%"+userLoginId+"%")));
 
                     fieldsToSelect.add("userLoginId");
                 }
@@ -1128,7 +1131,7 @@
                     dynamicView.addViewLink("PT", "PG", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
 
                     // add the expr
-                    andExprs.add(new EntityExpr("groupName", true, EntityOperator.LIKE, "%"+groupName+"%", true));
+                    andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("groupName"), EntityOperator.LIKE, EntityFunction.UPPER("%"+groupName+"%")));
 
                     fieldsToSelect.add("groupName");
                 }
@@ -1153,13 +1156,13 @@
                 // filter on firstName
                 if (firstName != null && firstName.length() > 0) {
                     paramList = paramList + "&firstName=" + firstName;
-                    andExprs.add(new EntityExpr("firstName", true, EntityOperator.LIKE, "%"+firstName+"%", true));
+                    andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("firstName"), EntityOperator.LIKE, EntityFunction.UPPER("%"+firstName+"%")));
                 }
 
                 // filter on lastName
                 if (lastName != null && lastName.length() > 0) {
                     paramList = paramList + "&lastName=" + lastName;
-                    andExprs.add(new EntityExpr("lastName", true, EntityOperator.LIKE, "%"+lastName+"%", true));
+                    andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("lastName"), EntityOperator.LIKE, EntityFunction.UPPER("%"+lastName+"%")));
                 }
 
                 // ----
@@ -1176,7 +1179,7 @@
                     dynamicView.addViewLink("PT", "PR", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
 
                     // add the expr
-                    andExprs.add(new EntityExpr("roleTypeId", EntityOperator.EQUALS, roleTypeId));
+                    andExprs.add(EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, roleTypeId));
 
                     fieldsToSelect.add("roleTypeId");
                 }
@@ -1202,21 +1205,21 @@
                     paramList = paramList + "&inventoryItemId=" + inventoryItemId;
                     dynamicView.addAlias("II", "inventoryItemId");
                     // add the expr
-                    andExprs.add(new EntityExpr("inventoryItemId", true, EntityOperator.LIKE, "%" + inventoryItemId + "%", true));
+                    andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("inventoryItemId"), EntityOperator.LIKE, EntityFunction.UPPER("%" + inventoryItemId + "%")));
                     fieldsToSelect.add("inventoryItemId");
                 }
                 if (UtilValidate.isNotEmpty(serialNumber)) {
                     paramList = paramList + "&serialNumber=" + serialNumber;
                     dynamicView.addAlias("II", "serialNumber");
                     // add the expr
-                    andExprs.add(new EntityExpr("serialNumber", true, EntityOperator.LIKE, "%" + serialNumber + "%", true));
+                    andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("serialNumber"), EntityOperator.LIKE, EntityFunction.UPPER("%" + serialNumber + "%")));
                     fieldsToSelect.add("serialNumber");
                 }
                 if (UtilValidate.isNotEmpty(softIdentifier)) {
                     paramList = paramList + "&softIdentifier=" + softIdentifier;
                     dynamicView.addAlias("II", "softIdentifier");
                     // add the expr
-                    andExprs.add(new EntityExpr("softIdentifier", true, EntityOperator.LIKE, "%" + softIdentifier + "%", true));
+                    andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("softIdentifier"), EntityOperator.LIKE, EntityFunction.UPPER("%" + softIdentifier + "%")));
                     fieldsToSelect.add("softIdentifier");
                 }
 
@@ -1241,34 +1244,34 @@
                     String address1 = (String) context.get("address1");
                     if (address1 != null && address1.length() > 0) {
                         paramList = paramList + "&address1=" + address1;
-                        andExprs.add(new EntityExpr("address1", true, EntityOperator.LIKE, "%" + address1 + "%", true));
+                        andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("address1"), EntityOperator.LIKE, EntityFunction.UPPER("%" + address1 + "%")));
                     }
 
                     // filter on address2
                     String address2 = (String) context.get("address2");
                     if (address2 != null && address2.length() > 0) {
                         paramList = paramList + "&address2=" + address2;
-                        andExprs.add(new EntityExpr("address2", true, EntityOperator.LIKE, "%" + address2 + "%", true));
+                        andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("address2"), EntityOperator.LIKE, EntityFunction.UPPER("%" + address2 + "%")));
                     }
 
                     // filter on city
                     String city = (String) context.get("city");
                     if (city != null && city.length() > 0) {
                         paramList = paramList + "&city=" + city;
-                        andExprs.add(new EntityExpr("city", true, EntityOperator.EQUALS, city, true));
+                        andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("city"), EntityOperator.EQUALS, EntityFunction.UPPER(city)));
                     }
 
                     // filter on state geo
                     if (stateProvinceGeoId != null && !"ANY".equals(stateProvinceGeoId)) {
                         paramList = paramList + "&stateProvinceGeoId=" + stateProvinceGeoId;
-                        andExprs.add(new EntityExpr("stateProvinceGeoId", EntityOperator.EQUALS, stateProvinceGeoId));
+                        andExprs.add(EntityCondition.makeCondition("stateProvinceGeoId", EntityOperator.EQUALS, stateProvinceGeoId));
                     }
 
                     // filter on postal code
                     String postalCode = (String) context.get("postalCode");
                     if (postalCode != null && postalCode.length() > 0) {
                         paramList = paramList + "&postalCode=" + postalCode;
-                        andExprs.add(new EntityExpr("postalCode", true, EntityOperator.LIKE, "%" + postalCode + "%", true));
+                        andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("postalCode"), EntityOperator.LIKE, EntityFunction.UPPER("%" + postalCode + "%")));
                     }
 
                     fieldsToSelect.add("postalCode");
@@ -1292,7 +1295,7 @@
                     String infoString = (String) context.get("infoString");
                     if (infoString != null && infoString.length() > 0) {
                         paramList = paramList + "&infoString=" + infoString;
-                        andExprs.add(new EntityExpr("infoString", true, EntityOperator.LIKE, "%"+infoString+"%", true));
+                        andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("infoString"), EntityOperator.LIKE, EntityFunction.UPPER("%"+infoString+"%")));
                     }
 
                     fieldsToSelect.add("infoString");
@@ -1316,21 +1319,21 @@
                     String countryCode = (String) context.get("countryCode");
                     if (countryCode != null && countryCode.length() > 0) {
                         paramList = paramList + "&countryCode=" + countryCode;
-                        andExprs.add(new EntityExpr("countryCode", true, EntityOperator.EQUALS, countryCode, true));
+                        andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("countryCode"), EntityOperator.EQUALS, EntityFunction.UPPER(countryCode)));
                     }
 
                     // filter on areaCode
                     String areaCode = (String) context.get("areaCode");
                     if (areaCode != null && areaCode.length() > 0) {
                         paramList = paramList + "&areaCode=" + areaCode;
-                        andExprs.add(new EntityExpr("areaCode", true, EntityOperator.EQUALS, areaCode, true));
+                        andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("areaCode"), EntityOperator.EQUALS, EntityFunction.UPPER(areaCode)));
                     }
 
                     // filter on contact number
                     String contactNumber = (String) context.get("contactNumber");
                     if (contactNumber != null && contactNumber.length() > 0) {
                         paramList = paramList + "&contactNumber=" + contactNumber;
-                        andExprs.add(new EntityExpr("contactNumber", true, EntityOperator.EQUALS, contactNumber, true));
+                        andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("contactNumber"), EntityOperator.EQUALS, EntityFunction.UPPER(contactNumber)));
                     }
 
                     fieldsToSelect.add("contactNumber");
@@ -1340,7 +1343,7 @@
                 // ---- End of Dynamic View Creation
 
                 // build the main condition
-                if (andExprs.size() > 0) mainCond = new EntityConditionList(andExprs, EntityOperator.AND);
+                if (andExprs.size() > 0) mainCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND);
             }
 
             Debug.logInfo("In findParty mainCond=" + mainCond, module);
@@ -1442,7 +1445,7 @@
         // update the contact mech records
         try {
             delegator.storeByCondition("PartyContactMech", UtilMisc.<String, Object>toMap("partyId", partyIdTo, "thruDate", now),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1451,7 +1454,7 @@
         // update the contact mech purpose records
         try {
             delegator.storeByCondition("PartyContactMechPurpose", UtilMisc.<String, Object>toMap("partyId", partyIdTo, "thruDate", now),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1460,7 +1463,7 @@
         // update the party notes
         try {
             delegator.storeByCondition("PartyNote", UtilMisc.toMap("partyId", partyIdTo),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1469,7 +1472,7 @@
         // update the inventory item(s)
         try {
             delegator.storeByCondition("InventoryItem", UtilMisc.toMap("ownerPartyId", partyIdTo),
-                    new EntityExpr("ownerPartyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("ownerPartyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1478,7 +1481,7 @@
         // update the subscription
         try {
             delegator.storeByCondition("Subscription", UtilMisc.toMap("partyId", partyIdTo),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1487,7 +1490,7 @@
         // update the userLogin records
         try {
             delegator.storeByCondition("UserLogin", UtilMisc.toMap("partyId", partyIdTo),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1519,7 +1522,7 @@
         // update the order role records
         try {
             delegator.storeByCondition("OrderRole", UtilMisc.toMap("partyId", partyIdTo),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1528,7 +1531,7 @@
         // invoice role
         try {
             delegator.storeByCondition("InvoiceRole", UtilMisc.toMap("partyId", partyIdTo),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1537,7 +1540,7 @@
         // data resource role
         try {
             delegator.storeByCondition("DataResourceRole", UtilMisc.toMap("partyId", partyIdTo),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1546,7 +1549,7 @@
         // content role
         try {
             delegator.storeByCondition("ContentRole", UtilMisc.toMap("partyId", partyIdTo),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());
@@ -1555,7 +1558,7 @@
         // update the fin account
         try {
             delegator.storeByCondition("FinAccountRole", UtilMisc.toMap("partyId", partyIdTo),
-                    new EntityExpr("partyId", EntityOperator.EQUALS, partyId));
+                    EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId));
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(e.getMessage());

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java Wed May 28 00:22:59 2008
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,16 +15,17 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 
 package org.ofbiz.party.party;
 
+import java.sql.Timestamp;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.sql.Timestamp;
+
 import javax.servlet.ServletRequest;
 import javax.servlet.jsp.PageContext;
 
@@ -39,8 +40,7 @@
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.condition.EntityCondition;
-import org.ofbiz.entity.condition.EntityConditionList;
-import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.condition.EntityFunction;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.util.EntityUtil;
@@ -233,9 +233,9 @@
             if ("**".equals(stateProvinceGeoId)) {
                 Debug.logWarning("Illegal state code passed!", module);
             } else if ("NA".equals(stateProvinceGeoId)) {
-                addrExprs.add(new EntityExpr("stateProvinceGeoId", EntityOperator.EQUALS, "_NA_"));
+                addrExprs.add(EntityCondition.makeCondition("stateProvinceGeoId", EntityOperator.EQUALS, "_NA_"));
             } else {
-                addrExprs.add(new EntityExpr("stateProvinceGeoId", EntityOperator.EQUALS, stateProvinceGeoId.toUpperCase()));
+                addrExprs.add(EntityCondition.makeCondition("stateProvinceGeoId", EntityOperator.EQUALS, stateProvinceGeoId.toUpperCase()));
             }
         }
 
@@ -245,26 +245,26 @@
                 postalCode = zipSplit[0];
                 postalCodeExt = zipSplit[1];
             }
-            addrExprs.add(new EntityExpr("postalCode", EntityOperator.EQUALS, postalCode));
+            addrExprs.add(EntityCondition.makeCondition("postalCode", EntityOperator.EQUALS, postalCode));
         }
 
         if (postalCodeExt != null) {
-            addrExprs.add(new EntityExpr("postalCodeExt", EntityOperator.EQUALS, postalCodeExt));
+            addrExprs.add(EntityCondition.makeCondition("postalCodeExt", EntityOperator.EQUALS, postalCodeExt));
         }
 
         city = city.replaceAll("'", "\\\\'");
-        addrExprs.add(new EntityExpr("city", true, EntityOperator.EQUALS, city, true));
+        addrExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("city"), EntityOperator.EQUALS, EntityFunction.UPPER(city)));
 
         if (countryGeoId != null) {
-            addrExprs.add(new EntityExpr("countryGeoId", EntityOperator.EQUALS, countryGeoId.toUpperCase()));
+            addrExprs.add(EntityCondition.makeCondition("countryGeoId", EntityOperator.EQUALS, countryGeoId.toUpperCase()));
         }
 
         // limit to only non-disabled status
-        addrExprs.add(new EntityExpr(new EntityExpr("statusId", EntityOperator.EQUALS, null),
-                EntityOperator.OR, new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "PARTY_DISABLED")));
+        addrExprs.add(EntityCondition.makeCondition(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, null),
+                EntityOperator.OR, EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PARTY_DISABLED")));
 
         List sort = UtilMisc.toList("-fromDate");
-        EntityCondition addrCond = new EntityConditionList(addrExprs, EntityOperator.AND);
+        EntityCondition addrCond = EntityCondition.makeCondition(addrExprs, EntityOperator.AND);
         List addresses = EntityUtil.filterByDate(delegator.findList("PartyAndPostalAddress", addrCond, null, sort, null, false));
         //Debug.log("Checking for matching address: " + addrCond.toString() + "[" + addresses.size() + "]", module);
 

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/listCommunications.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/listCommunications.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/listCommunications.bsh (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/listCommunications.bsh Wed May 28 00:22:59 2008
@@ -38,8 +38,8 @@
     sortField = "-" + sortField;
 }
 
-eventExprs = UtilMisc.toList(new EntityExpr("partyIdTo", EntityOperator.EQUALS, partyId), new EntityExpr("partyIdFrom", EntityOperator.EQUALS, partyId));
-ecl = new EntityConditionList(eventExprs, EntityOperator.OR);
+eventExprs = UtilMisc.toList(EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, partyId), EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, partyId));
+ecl = EntityCondition.makeCondition(eventExprs, EntityOperator.OR);
 events = delegator.findList("CommunicationEvent", ecl, null, UtilMisc.toList(sortField), null, false);
 context.put("eventList", events);
 context.put("eventListSize", events.size());

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/pendingCommunications.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/pendingCommunications.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/pendingCommunications.bsh (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/pendingCommunications.bsh Wed May 28 00:22:59 2008
@@ -73,34 +73,34 @@
 while (pri.hasNext()) {
     partyRole = (GenericValue) pri.next();
     if (!partyRole.getString("roleTypeId").equals("_NA_")) {
-        pRolesList.add(new EntityExpr("roleTypeIdTo", EntityOperator.EQUALS, partyRole.getString("roleTypeId")));
+        pRolesList.add(EntityCondition.makeCondition("roleTypeIdTo", EntityOperator.EQUALS, partyRole.getString("roleTypeId")));
     }
 }
 
 // add in events with no role attached
-pRolesList.add(new EntityExpr("roleTypeIdTo", EntityOperator.EQUALS, null));
+pRolesList.add(EntityCondition.makeCondition("roleTypeIdTo", EntityOperator.EQUALS, null));
 
 // limit to just this user's events, or those not attached to a user
 partyList = new ArrayList();
-partyList.add(new EntityExpr("partyIdTo", EntityOperator.EQUALS, null));
-partyList.add(new EntityExpr("partyIdTo", EntityOperator.EQUALS, partyId));
+partyList.add(EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, null));
+partyList.add(EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, partyId));
 if ("Y".equalsIgnoreCase(fromFlag)) {
-    partyList.add(new EntityExpr("partyIdFrom", EntityOperator.EQUALS, null));
-    partyList.add(new EntityExpr("partyIdFrom", EntityOperator.EQUALS, partyId));
+    partyList.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, null));
+    partyList.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, partyId));
 }
 
 // limit to non-completed items
 statusList = new ArrayList();
-statusList.add(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "COM_COMPLETE"));
-statusList.add(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "COM_RESOLVED"));
-statusList.add(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "COM_REFERRED"));
+statusList.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "COM_COMPLETE"));
+statusList.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "COM_RESOLVED"));
+statusList.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "COM_REFERRED"));
 
 // build the condition
 expressions = new ArrayList();
-expressions.add(new EntityConditionList(partyList, EntityOperator.OR));
-expressions.add(new EntityConditionList(pRolesList, EntityOperator.OR));
-expressions.add(new EntityConditionList(statusList, EntityOperator.AND));
-condition = new EntityConditionList(expressions, EntityOperator.AND);
+expressions.add(EntityCondition.makeCondition(partyList, EntityOperator.OR));
+expressions.add(EntityCondition.makeCondition(pRolesList, EntityOperator.OR));
+expressions.add(EntityCondition.makeCondition(statusList, EntityOperator.AND));
+condition = EntityCondition.makeCondition(expressions, EntityOperator.AND);
 
 // specific fields to select
 fieldsToSelect = null;

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/viewroles.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/viewroles.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/viewroles.bsh (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/viewroles.bsh Wed May 28 00:22:59 2008
@@ -34,9 +34,9 @@
 if (partyId == null) partyId = (String) request.getAttribute("partyId");
 context.put("partyId", partyId);
 
-EntityConditionList ecl = new EntityConditionList(UtilMisc.toList(
-                                new EntityExpr("partyId", EntityOperator.EQUALS, partyId),
-                                new EntityExpr("roleTypeId", EntityOperator.NOT_EQUAL, "_NA_")),
+EntityConditionList ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                                EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId),
+                                EntityCondition.makeCondition("roleTypeId", EntityOperator.NOT_EQUAL, "_NA_")),
                             EntityOperator.AND);
 partyRoles = delegator.findList("RoleTypeAndParty", ecl, null, UtilMisc.toList("description"), null, false);
 context.put("partyRoles", partyRoles);

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/showvisits.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/showvisits.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/showvisits.bsh (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/showvisits.bsh Wed May 28 00:22:59 2008
@@ -44,12 +44,12 @@
     beganTransaction = TransactionUtil.begin();
 
     if (partyId != null) {
-        visitListIt = delegator.find("Visit", new EntityExpr("partyId", EntityOperator.EQUALS, partyId), null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));    
+        visitListIt = delegator.find("Visit", EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId), null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));    
     } else if (showAll.equalsIgnoreCase("true")) {
         visitListIt = delegator.find("Visit", null, null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));
     } else {
         // show active visits      
-        visitListIt = delegator.find("Visit", new EntityExpr("thruDate", EntityOperator.EQUALS, null), null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));  
+        visitListIt = delegator.find("Visit", EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));  
     }
     
     viewIndex = 1;

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java Wed May 28 00:22:59 2008
@@ -281,12 +281,12 @@
                         highIndex = listSize;
                     }
                 } else {
-                    List mainCondList = UtilMisc.toList(new EntityExpr("productCategoryId", EntityOperator.EQUALS, productCategory.getString("productCategoryId")));
+                    List mainCondList = UtilMisc.toList(EntityCondition.makeCondition("productCategoryId", EntityOperator.EQUALS, productCategory.getString("productCategoryId")));
                     if (activeOnly) {
-                        mainCondList.add(new EntityExpr("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp));
-                        mainCondList.add(new EntityExpr(new EntityExpr("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr("thruDate", EntityOperator.GREATER_THAN, nowTimestamp)));
+                        mainCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp));
+                        mainCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, nowTimestamp)));
                     }
-                    EntityCondition mainCond = new EntityConditionList(mainCondList, EntityOperator.AND);
+                    EntityCondition mainCond = EntityCondition.makeCondition(mainCondList, EntityOperator.AND);
                 
                     // set distinct on
                     EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Wed May 28 00:22:59 2008
@@ -257,15 +257,15 @@
 
     private static EntityCondition buildCountCondition(String fieldName, String fieldValue) {
         List orCondList = FastList.newInstance();
-        orCondList.add(new EntityExpr("thruDate", EntityOperator.GREATER_THAN, UtilDateTime.nowTimestamp()));
-        orCondList.add(new EntityExpr("thruDate", EntityOperator.EQUALS, null));
-        EntityCondition orCond = new EntityConditionList(orCondList, EntityOperator.OR);
+        orCondList.add(EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, UtilDateTime.nowTimestamp()));
+        orCondList.add(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null));
+        EntityCondition orCond = EntityCondition.makeCondition(orCondList, EntityOperator.OR);
 
         List andCondList = FastList.newInstance();
-        andCondList.add(new EntityExpr("fromDate", EntityOperator.LESS_THAN, UtilDateTime.nowTimestamp()));
-        andCondList.add(new EntityExpr(fieldName, EntityOperator.EQUALS, fieldValue));
+        andCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, UtilDateTime.nowTimestamp()));
+        andCondList.add(EntityCondition.makeCondition(fieldName, EntityOperator.EQUALS, fieldValue));
         andCondList.add(orCond);
-        EntityCondition andCond = new EntityConditionList(andCondList, EntityOperator.AND);
+        EntityCondition andCond = EntityCondition.makeCondition(andCondList, EntityOperator.AND);
 
         return andCond;
     }

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java Wed May 28 00:22:59 2008
@@ -361,7 +361,7 @@
         // find all inventory items w/ a negative ATP
         List inventoryItems = null;
         try {
-            EntityExpr ee = new EntityExpr("availableToPromiseTotal", EntityOperator.LESS_THAN, new Double(0));
+            EntityExpr ee = EntityCondition.makeCondition("availableToPromiseTotal", EntityOperator.LESS_THAN, new Double(0));
             inventoryItems = delegator.findList("InventoryItem", ee, null, null, null, false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Trouble getting inventory items", module);
@@ -383,12 +383,12 @@
             List shipmentAndItems = null;
             try {
                 List<EntityExpr> exprs = FastList.newInstance();
-                exprs.add(new EntityExpr("productId", EntityOperator.EQUALS, inventoryItem.get("productId")));
-                exprs.add(new EntityExpr("destinationFacilityId", EntityOperator.EQUALS, inventoryItem.get("facilityId")));
-                exprs.add(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "SHIPMENT_DELIVERED"));
-                exprs.add(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "SHIPMENT_CANCELLED"));
+                exprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, inventoryItem.get("productId")));
+                exprs.add(EntityCondition.makeCondition("destinationFacilityId", EntityOperator.EQUALS, inventoryItem.get("facilityId")));
+                exprs.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "SHIPMENT_DELIVERED"));
+                exprs.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "SHIPMENT_CANCELLED"));
 
-                EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(exprs, EntityOperator.AND);
+                EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(exprs, EntityOperator.AND);
                 shipmentAndItems = delegator.findList("ShipmentAndItem", ecl, null, UtilMisc.toList("estimatedArrivalDate"), null, false);  
             } catch (GenericEntityException e) {
                 Debug.logError(e, "Problem getting ShipmentAndItem records", module);
@@ -932,13 +932,13 @@
             EntityListIterator salesUsageIt = null;
             try {
                 salesUsageIt = delegator.findListIteratorByCondition(salesUsageViewEntity,
-                        new EntityConditionList(
+                        EntityCondition.makeCondition(
                             UtilMisc.toList(
-                                new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId),
-                                new EntityExpr("productId", EntityOperator.EQUALS, productId),
-                                new EntityExpr("statusId", EntityOperator.IN, UtilMisc.toList("ORDER_COMPLETED", "ORDER_APPROVED", "ORDER_HELD")),
-                                new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"),
-                                new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime)
+                                EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId),
+                                EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId),
+                                EntityCondition.makeCondition("statusId", EntityOperator.IN, UtilMisc.toList("ORDER_COMPLETED", "ORDER_APPROVED", "ORDER_HELD")),
+                                EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"),
+                                EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime)
                             ),
                         EntityOperator.AND),
                     null, null, null, null);
@@ -970,12 +970,12 @@
             EntityListIterator productionUsageIt = null;
             try {
                 productionUsageIt = delegator.findListIteratorByCondition(productionUsageViewEntity,
-                        new EntityConditionList(
+                        EntityCondition.makeCondition(
                             UtilMisc.toList(
-                                new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId),
-                                new EntityExpr("productId", EntityOperator.EQUALS, productId),
-                                new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "PROD_ORDER_TASK"),
-                                new EntityExpr("actualCompletionDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime)
+                                EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId),
+                                EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId),
+                                EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "PROD_ORDER_TASK"),
+                                EntityCondition.makeCondition("actualCompletionDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime)
                             ),
                         EntityOperator.AND),
                     null, null, null, null);