You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2008/05/11 11:37:21 UTC

svn commit: r655287 - in /ofbiz/trunk: applications/accounting/webapp/accounting/WEB-INF/actions/invoice/ applications/accounting/webapp/accounting/WEB-INF/actions/transaction/ applications/accounting/webapp/accounting/fixedasset/ applications/order/we...

Author: lektran
Date: Sun May 11 02:37:21 2008
New Revision: 655287

URL: http://svn.apache.org/viewvc?rev=655287&view=rev
Log:
Removed calls to the 2 deprecated findByAnd GenericDelegator methods from all bsh and ftl files plus some java ones in the shark component

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/createApplicationList.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/orderListInvoiceItem.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeList.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureList.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/month.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderstats.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderview.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/receivepayment.bsh
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/getCurrentCart.bsh
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/viewroles.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindFacilityTransfers.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh
    ofbiz/trunk/framework/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/createApplicationList.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/createApplicationList.bsh?rev=655287&r1=655286&r2=655287&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/createApplicationList.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/createApplicationList.bsh Sun May 11 02:37:21 2008
@@ -43,7 +43,7 @@
 if (invoice != null) {    
     // retrieve related applications with null itemnumber
     invoiceAppl = null;  
-    invoiceAppls = delegator.findByAnd("PaymentApplication",UtilMisc.toMap("invoiceId", invoiceId,"invoiceItemSeqId",null));
+    invoiceAppls = delegator.findByAnd("PaymentApplication", UtilMisc.toMap("invoiceId", invoiceId, "invoiceItemSeqId", null));
     Iterator q = invoiceAppls.iterator();
     while (q.hasNext()) {
         invoiceAppl = q.next();

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/orderListInvoiceItem.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/orderListInvoiceItem.bsh?rev=655287&r1=655286&r2=655287&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/orderListInvoiceItem.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/orderListInvoiceItem.bsh Sun May 11 02:37:21 2008
@@ -26,7 +26,7 @@
 invoiceId = context.get("invoiceId");
 if(invoiceId != null) {
     List invoiceItems = new LinkedList();
-    invoiceItemList = delegator.findByAnd("InvoiceItem", UtilMisc.toMap("invoiceId", invoiceId),UtilMisc.toList("invoiceItemSeqId"));
+    invoiceItemList = delegator.findByAnd("InvoiceItem", UtilMisc.toMap("invoiceId", invoiceId), UtilMisc.toList("invoiceItemSeqId"));
     if(invoiceItemList != null) {
         itr = invoiceItemList.iterator();
         while(itr.hasNext()) {

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeList.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeList.bsh?rev=655287&r1=655286&r2=655287&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeList.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/authorizeList.bsh Sun May 11 02:37:21 2008
@@ -21,6 +21,5 @@
 import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
 
-andCondition = new EntityExpr("statusId", EntityOperator.EQUALS, "PAYMENT_NOT_AUTH");
-orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toList(andCondition), UtilMisc.toList("createdDate DESC"));
+orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("statusId", "PAYMENT_NOT_AUTH"), UtilMisc.toList("createdDate DESC"));
 context.put("orderPaymentPreferences", orderPaymentPreferences);

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureList.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureList.bsh?rev=655287&r1=655286&r2=655287&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureList.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureList.bsh Sun May 11 02:37:21 2008
@@ -20,6 +20,5 @@
 import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
 
-andCondition = new EntityExpr("statusId", EntityOperator.EQUALS, "PAYMENT_SETTLED");
-orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toList(andCondition), UtilMisc.toList("createdDate DESC"));
+orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", UtilMisc.toMap("statusId", "PAYMENT_SETTLED"), UtilMisc.toList("createdDate DESC"));
 context.put("orderPaymentPreferences", orderPaymentPreferences);

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/month.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/month.bsh?rev=655287&r1=655286&r2=655287&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/month.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/month.bsh Sun May 11 02:37:21 2008
@@ -57,7 +57,8 @@
 condition.add(new EntityExpr("calendarId", EntityOperator.EQUALS, fixedAsset.getString("calendarId")));
 condition.add(new EntityExpr("exceptionDateStartTime",EntityOperator.GREATER_THAN, now));
 condition.add(new EntityExpr("exceptionDateStartTime",EntityOperator.LESS_THAN, nextMonth));
-List allDates = delegator.findByAnd("TechDataCalendarExcDay", condition);
+EntityConditionList ecl = new EntityConditionList(condition, EntityOperator.AND);
+List allDates = delegator.findList("TechDataCalendarExcDay", ecl, null, null, null, false);
 Iterator dbInt = allDates.iterator();
 dbValid = false;    // flag to see if the current dbInt is ok
 excDayRecord = null;

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=655287&r1=655286&r2=655287&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 Sun May 11 02:37:21 2008
@@ -65,28 +65,48 @@
 Timestamp yearBegin = new Timestamp(cal.getTime().getTime());       
   
 // order status report
-List dayList = delegator.findByAnd("OrderStatus", 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 = 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)), 
+                            EntityOperator.AND);
+List dayList = delegator.findList("OrderStatus", ecl, null, null, null, false);
 context.put("dayOrder", EntityUtil.filterByAnd(dayList, UtilMisc.toMap("statusId", "ORDER_ORDERED")));
 context.put("dayApprove", EntityUtil.filterByAnd(dayList, UtilMisc.toMap("statusId", "ORDER_APPROVED")));
 context.put("dayComplete", EntityUtil.filterByAnd(dayList, UtilMisc.toMap("statusId", "ORDER_COMPLETED")));
 context.put("dayCancelled", EntityUtil.filterByAnd(dayList, UtilMisc.toMap("statusId", "ORDER_CANCELLED")));
 context.put("dayRejected", EntityUtil.filterByAnd(dayList, UtilMisc.toMap("statusId", "ORDER_REJECTED")));
   
-List weekList = delegator.findByAnd("OrderStatus", UtilMisc.toList(new EntityExpr("orderItemSeqId", EntityOperator.EQUALS, null), new EntityExpr("orderPaymentPreferenceId", EntityOperator.EQUALS, null), new EntityExpr("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, weekBegin)));
+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)), 
+                    EntityOperator.AND);
+List weekList = delegator.findList("OrderStatus", ecl, null, null, null, false);
 context.put("weekOrder", EntityUtil.filterByAnd(weekList, UtilMisc.toMap("statusId", "ORDER_ORDERED")));
 context.put("weekApprove", EntityUtil.filterByAnd(weekList, UtilMisc.toMap("statusId", "ORDER_APPROVED")));
 context.put("weekComplete", EntityUtil.filterByAnd(weekList, UtilMisc.toMap("statusId", "ORDER_COMPLETED")));
 context.put("weekCancelled", EntityUtil.filterByAnd(weekList, UtilMisc.toMap("statusId", "ORDER_CANCELLED")));
 context.put("weekRejected", EntityUtil.filterByAnd(weekList, UtilMisc.toMap("statusId", "ORDER_REJECTED")));
   
-List monthList = delegator.findByAnd("OrderStatus", UtilMisc.toList(new EntityExpr("orderItemSeqId", EntityOperator.EQUALS, null), new EntityExpr("orderPaymentPreferenceId", EntityOperator.EQUALS, null), new EntityExpr("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, monthBegin)));
+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)),
+                    EntityOperator.AND);
+List monthList = delegator.findList("OrderStatus", ecl, null, null, null, false);
 context.put("monthOrder", EntityUtil.filterByAnd(monthList, UtilMisc.toMap("statusId", "ORDER_ORDERED")));
 context.put("monthApprove", EntityUtil.filterByAnd(monthList, UtilMisc.toMap("statusId", "ORDER_APPROVED")));
 context.put("monthComplete", EntityUtil.filterByAnd(monthList, UtilMisc.toMap("statusId", "ORDER_COMPLETED")));
 context.put("monthCancelled", EntityUtil.filterByAnd(monthList, UtilMisc.toMap("statusId", "ORDER_CANCELLED")));
 context.put("monthRejected", EntityUtil.filterByAnd(monthList, UtilMisc.toMap("statusId", "ORDER_REJECTED")));
   
-List yearList = delegator.findByAnd("OrderStatus", UtilMisc.toList(new EntityExpr("orderItemSeqId", EntityOperator.EQUALS, null), new EntityExpr("orderPaymentPreferenceId", EntityOperator.EQUALS, null), new EntityExpr("statusDatetime", EntityOperator.GREATER_THAN_EQUAL_TO, yearBegin)));
+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)),
+                    EntityOperator.AND);
+List yearList = delegator.findList("OrderStatus", ecl, null, null, null, false);
 context.put("yearOrder", EntityUtil.filterByAnd(yearList, UtilMisc.toMap("statusId", "ORDER_ORDERED")));
 context.put("yearApprove", EntityUtil.filterByAnd(yearList, UtilMisc.toMap("statusId", "ORDER_APPROVED")));
 context.put("yearComplete", EntityUtil.filterByAnd(yearList, UtilMisc.toMap("statusId", "ORDER_COMPLETED")));
@@ -94,12 +114,22 @@
 context.put("yearRejected", EntityUtil.filterByAnd(yearList, UtilMisc.toMap("statusId", "ORDER_REJECTED")));
   
 // order totals and item counts
-List dayItemExpr = 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"));
-List dayItems = delegator.findByAnd("OrderHeaderAndItems", dayItemExpr);
+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")),
+                    EntityOperator.AND);
+List dayItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
 List dayItemsPending = EntityUtil.filterByAnd(dayItems, UtilMisc.toMap("itemStatusId", "ITEM_ORDERED"));
-              
-List dayHeaderExpr = 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"));
-List dayHeaders = delegator.findByAnd("OrderHeader", dayHeaderExpr);
+
+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")),
+                    EntityOperator.AND);
+List dayHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
 List dayHeadersPending = EntityUtil.filterByAnd(dayHeaders, UtilMisc.toMap("statusId", "ORDER_ORDERED"));   
                                                  
 double dayItemTotal = calcItemTotal(dayHeaders);
@@ -114,13 +144,23 @@
 context.put("dayItemCountPending", dayItemCountPending);
 context.put("dayItemTotalPaid", dayItemTotalPaid);
 context.put("dayItemCountPaid", dayItemCountPaid);
-  
-List weekItemExpr = 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"));
-List weekItems = delegator.findByAnd("OrderHeaderAndItems", weekItemExpr);
+
+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")),
+                    EntityOperator.AND);
+List weekItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
 List weekItemsPending = EntityUtil.filterByAnd(weekItems, UtilMisc.toMap("itemStatusId", "ITEM_ORDERED"));
-          
-List weekHeaderExpr = 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"));
-List weekHeaders = delegator.findByAnd("OrderHeader", weekHeaderExpr);
+
+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")),
+                    EntityOperator.AND);
+List weekHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
 List weekHeadersPending = EntityUtil.filterByAnd(weekHeaders, UtilMisc.toMap("statusId", "ORDER_ORDERED")); 
          
 double weekItemTotal = calcItemTotal(weekHeaders);
@@ -135,13 +175,23 @@
 context.put("weekItemCountPending", weekItemCountPending);
 context.put("weekItemTotalPaid", weekItemTotalPaid);
 context.put("weekItemCountPaid", weekItemCountPaid);
- 
-List monthItemExpr = 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"));
-List monthItems = delegator.findByAnd("OrderHeaderAndItems", monthItemExpr);
+
+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")),
+                    EntityOperator.AND);
+List monthItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
 List monthItemsPending = EntityUtil.filterByAnd(monthItems, UtilMisc.toMap("itemStatusId", "ITEM_ORDERED"));
 
-List monthHeaderExpr = 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"));
-List monthHeaders = delegator.findByAnd("OrderHeader", monthHeaderExpr);
+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")),
+                    EntityOperator.AND);
+List monthHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
 List monthHeadersPending = EntityUtil.filterByAnd(monthHeaders, UtilMisc.toMap("statusId", "ORDER_ORDERED"));   
 
 double monthItemTotal = calcItemTotal(monthHeaders);
@@ -157,12 +207,22 @@
 context.put("monthItemTotalPaid", monthItemTotalPaid);
 context.put("monthItemCountPaid", monthItemCountPaid);
   
-List yearItemExpr = 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"));
-List yearItems = delegator.findByAnd("OrderHeaderAndItems", yearItemExpr);
+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")),
+                    EntityOperator.AND);
+List yearItems = delegator.findList("OrderHeaderAndItems", ecl, null, null, null, false);
 List yearItemsPending = EntityUtil.filterByAnd(yearItems, UtilMisc.toMap("itemStatusId", "ITEM_ORDERED"));
    
-List yearHeaderExpr = 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"));
-List yearHeaders = delegator.findByAnd("OrderHeader", yearHeaderExpr);
+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")),
+                    EntityOperator.AND);
+List yearHeaders = delegator.findList("OrderHeader", ecl, null, null, null, false);
 List yearHeadersPending = EntityUtil.filterByAnd(yearHeaders, UtilMisc.toMap("statusId", "ORDER_ORDERED")); 
 
 double yearItemTotal = calcItemTotal(yearHeaders);

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=655287&r1=655286&r2=655287&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 Sun May 11 02:37:21 2008
@@ -168,8 +168,11 @@
     }
     context.put("invoices", allInvoices);
 
-    oppFields = UtilMisc.toList(new EntityExpr("orderId", EntityOperator.EQUALS, orderId), new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED"));
-    orderPaymentPreferences = delegator.findByAnd("OrderPaymentPreference", oppFields);
+    EntityConditionList ecl = new EntityConditionList(UtilMisc.toList(
+                                    new EntityExpr("orderId", EntityOperator.EQUALS, orderId), 
+                                    new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")),
+                                EntityOperator.AND);
+    orderPaymentPreferences = delegator.findList("OrderPaymentPreference", ecl, null, null, null, false);
     context.put("orderPaymentPreferences", orderPaymentPreferences);
 
     // ship groups
@@ -192,7 +195,7 @@
     }
     context.put("customerPoNumber", customerPoNumber);
 
-    statusChange = delegator.findByAnd("StatusValidChange",UtilMisc.toMap("statusId",orderHeader.getString("statusId")));
+    statusChange = delegator.findByAnd("StatusValidChange", UtilMisc.toMap("statusId",orderHeader.getString("statusId")));
     context.put("statusChange", statusChange);
 
     currentStatus = orderHeader.getRelatedOne("StatusItem");

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=655287&r1=655286&r2=655287&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 Sun May 11 02:37:21 2008
@@ -23,8 +23,7 @@
 
 delegator = request.getAttribute("delegator");
 orderId = request.getParameter("orderId");
-pmtFields = UtilMisc.toList(new EntityExpr("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE"));
-paymentMethodTypes = delegator.findByAnd("PaymentMethodType", pmtFields);
+paymentMethodTypes = delegator.findList("PaymentMethodType", new EntityExpr("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE"), null, null, null, false);
 context.put("paymentMethodTypes", paymentMethodTypes); 
     
 workEffortId = request.getParameter("workEffortId");

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/getCurrentCart.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/getCurrentCart.bsh?rev=655287&r1=655286&r2=655287&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/getCurrentCart.bsh (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/getCurrentCart.bsh Sun May 11 02:37:21 2008
@@ -24,7 +24,7 @@
     partyId = parameters.get("partyId");
 }
 
-savedCartList = EntityUtil.getFirst(delegator.findByAnd("ShoppingList",UtilMisc.toMap("partyId", partyId,
+savedCartList = EntityUtil.getFirst(delegator.findByAnd("ShoppingList", UtilMisc.toMap("partyId", partyId,
         "shoppingListTypeId", "SLT_SPEC_PURP", "listName", "auto-save")));
 
 if (savedCartList != 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=655287&r1=655286&r2=655287&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 Sun May 11 02:37:21 2008
@@ -34,8 +34,11 @@
 if (partyId == null) partyId = (String) request.getAttribute("partyId");
 context.put("partyId", partyId);
 
-partyRoleExprs = UtilMisc.toList(new EntityExpr("partyId", EntityOperator.EQUALS, partyId), new EntityExpr("roleTypeId", EntityOperator.NOT_EQUAL, "_NA_"));
-partyRoles = delegator.findByAnd("RoleTypeAndParty", partyRoleExprs, UtilMisc.toList("description"));
+EntityConditionList ecl = new EntityConditionList(UtilMisc.toList(
+                                new EntityExpr("partyId", EntityOperator.EQUALS, partyId), 
+                                new EntityExpr("roleTypeId", EntityOperator.NOT_EQUAL, "_NA_")),
+                            EntityOperator.AND);
+partyRoles = delegator.findList("RoleTypeAndParty", ecl, null, UtilMisc.toList("description"), null, false);
 context.put("partyRoles", partyRoles);
 
 roles = delegator.findList("RoleType", null, null, UtilMisc.toList("description", "roleTypeId"), null, false);

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindFacilityTransfers.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindFacilityTransfers.bsh?rev=655287&r1=655286&r2=655287&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindFacilityTransfers.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindFacilityTransfers.bsh Sun May 11 02:37:21 2008
@@ -40,7 +40,8 @@
 if (completeRequested) {
     exprsTo = UtilMisc.toList(new EntityExpr("facilityIdTo", EntityOperator.EQUALS, facilityId), new EntityExpr("statusId", EntityOperator.EQUALS, "IXF_REQUESTED"));
 }
-List toTransfers = delegator.findByAnd("InventoryTransfer", exprsTo, UtilMisc.toList("sendDate"));
+EntityConditionList ecl = new EntityConditionList(exprsTo, EntityOperator.AND);
+List toTransfers = delegator.findList("InventoryTransfer", ecl, null, UtilMisc.toList("sendDate"), null, false);
 if (toTransfers != null) context.put("toTransfers", toTransfers);
 
 // get the 'from' this facility transfers
@@ -53,5 +54,6 @@
 if (completeRequested) {
     exprsFrom = UtilMisc.toList(new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId), new EntityExpr("statusId", EntityOperator.EQUALS, "IXF_REQUESTED"));
 }
-List fromTransfers = delegator.findByAnd("InventoryTransfer", exprsFrom, UtilMisc.toList("sendDate"));
+ecl = new EntityConditionList(exprsFrom, EntityOperator.AND);
+List fromTransfers = delegator.findList("InventoryTransfer", ecl, null, UtilMisc.toList("sendDate"), null, false);
 if (fromTransfers != null) context.put("fromTransfers", fromTransfers);

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh?rev=655287&r1=655286&r2=655287&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh Sun May 11 02:37:21 2008
@@ -44,7 +44,8 @@
 }
 
 if (conditions.size() > 2) {
-    physicalInventory = delegator.findByAnd("ProductInventoryItem", conditions, UtilMisc.toList("productId"));
+    EntityConditionList ecl = new EntityConditionList(conditions, EntityOperator.AND);
+    physicalInventory = delegator.findByAnd("ProductInventoryItem", ecl, null, UtilMisc.toList("productId"), null, false);
 
     // also need the overal product QOH and ATP for each product
     atpMap = FastMap.newInstance();

Modified: ofbiz/trunk/framework/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java?rev=655287&r1=655286&r2=655287&view=diff
==============================================================================
--- ofbiz/trunk/framework/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java (original)
+++ ofbiz/trunk/framework/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java Sun May 11 02:37:21 2008
@@ -876,7 +876,8 @@
             lookupList = new ArrayList();
         } else {
             try {
-                lookupList = delegator.findByAnd(org.ofbiz.shark.SharkConstants.WfDeadline, exprList);
+                EntityConditionList ecl = new EntityConditionList(exprList, EntityOperator.AND);
+                lookupList = delegator.findList(org.ofbiz.shark.SharkConstants.WfDeadline, ecl, null, null, null, false);
             } catch (GenericEntityException e) {
                 throw new PersistenceException(e);
             }