You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2008/05/28 09:23:02 UTC

svn commit: r660843 [1/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...

Author: jonesde
Date: Wed May 28 00:22:59 2008
New Revision: 660843

URL: http://svn.apache.org/viewvc?rev=660843&view=rev
Log:
More cleanups of now deprecated constructors and what what

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/SimpleTaxServices.java
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/findInvoices.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/getInvoiceItemTypes.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/findPayment.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureTransaction.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/viewGatewayResponse.bsh
    ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/month.bsh
    ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
    ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java
    ofbiz/trunk/applications/content/widget/cms/mostrecentprep.bsh
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/showcart.bsh
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderhistory.bsh
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/editShoppingList.bsh
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
    ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/findInventoryEventPlan.bsh
    ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java
    ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.bsh
    ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.bsh
    ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartItem.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductPromoWorker.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/shipping/ShippingEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddProducts.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/cart/LookupBulkAddSupplierProducts.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productdetail.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/orderlist.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/order/webapp/ordermgr/WEB-INF/actions/reports/OpenOrderItemsReport.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirementsByVendor.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/selectCreatedProposed.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/task/ordertasklist.bsh
    ofbiz/trunk/applications/order/webapp/ordermgr/reports/OrderReportPrepare.bsh
    ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyWorker.java
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/listCommunications.bsh
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/pendingCommunications.bsh
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/viewroles.bsh
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/showvisits.bsh
    ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryWorker.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/inventory/InventoryWorker.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/price/PriceServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductEvents.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/promo/PromoServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
    ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.bsh
    ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindFacilityTransfers.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/findInventoryItemsByLabels.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/FindFacilityPhysicalInventory.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.bsh
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.bsh
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java
    ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortServices.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java Wed May 28 00:22:59 2008
@@ -866,14 +866,14 @@
         opts.setFetchSize(1);
 
         List exprs = FastList.newInstance();
-        exprs.add(new EntityExpr("finAccountTransTypeId", EntityOperator.EQUALS, "DEPOSIT"));
-        exprs.add(new EntityExpr("finAccountId", EntityOperator.EQUALS, finAccountId));
-        exprs.add(new EntityExpr("orderId", EntityOperator.NOT_EQUAL, null));
+        exprs.add(EntityCondition.makeCondition("finAccountTransTypeId", EntityOperator.EQUALS, "DEPOSIT"));
+        exprs.add(EntityCondition.makeCondition("finAccountId", EntityOperator.EQUALS, finAccountId));
+        exprs.add(EntityCondition.makeCondition("orderId", EntityOperator.NOT_EQUAL, null));
         List orderBy = UtilMisc.toList("-transactionDate");
 
         List transList = null;
         try {
-            transList = delegator.findList("FinAccountTrans", new EntityConditionList(exprs, EntityOperator.AND), null, orderBy, opts, false);
+            transList = delegator.findList("FinAccountTrans", EntityCondition.makeCondition(exprs, EntityOperator.AND), null, orderBy, opts, false);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java Wed May 28 00:22:59 2008
@@ -349,9 +349,9 @@
                 BigDecimal remainingBalance = new BigDecimal(actualBalance.toString());
                 BigDecimal refundAmount = BigDecimal.ZERO;
 
-                List exprs = UtilMisc.toList(new EntityExpr("finAccountTransTypeId", EntityOperator.EQUALS, "DEPOSIT"),
-                        new EntityExpr("finAccountId", EntityOperator.EQUALS, finAccountId));
-                EntityCondition condition = new EntityConditionList(exprs, EntityOperator.AND);
+                List exprs = UtilMisc.toList(EntityCondition.makeCondition("finAccountTransTypeId", EntityOperator.EQUALS, "DEPOSIT"),
+                        EntityCondition.makeCondition("finAccountId", EntityOperator.EQUALS, finAccountId));
+                EntityCondition condition = EntityCondition.makeCondition(exprs, EntityOperator.AND);
 
                 EntityListIterator eli = null;
                 try {

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java Wed May 28 00:22:59 2008
@@ -1101,7 +1101,7 @@
                 return ServiceUtil.returnError(errMsg);
             }
         }
-        EntityCondition shipmentIdsCond = new EntityExpr("shipmentId", EntityOperator.IN, shipmentIds);
+        EntityCondition shipmentIdsCond = EntityCondition.makeCondition("shipmentId", EntityOperator.IN, shipmentIds);
         // check the status of the shipment
 
         // get the items of the shipment.  They can come from ItemIssuance if the shipment were from a sales order, ShipmentReceipt
@@ -1134,14 +1134,14 @@
                 
                     // If a sales invoice is being created for a drop shipment, we have to reference the original sales order items
                     // Get the list of the linked orderIds (original sales orders)
-                    orderItemAssocs = delegator.findList("OrderItemAssoc", new EntityExpr("toOrderId", EntityOperator.IN, purchaseOrderIds), null, null, null, false);
+                    orderItemAssocs = delegator.findList("OrderItemAssoc", EntityCondition.makeCondition("toOrderId", EntityOperator.IN, purchaseOrderIds), null, null, null, false);
     
                     // Get only the order items which are indirectly related to the purchase order - this limits the list to the drop ship group(s)
                     items = EntityUtil.getRelated("FromOrderItem", orderItemAssocs);
                 } else {
 
                     // If it's a purchase invoice being created, the order items for that purchase orders can be used directly
-                    items = delegator.findList("OrderItem", new EntityExpr("orderId", EntityOperator.IN, purchaseOrderIds), null, null, null, false);
+                    items = delegator.findList("OrderItem", EntityCondition.makeCondition("orderId", EntityOperator.IN, purchaseOrderIds), null, null, null, false);
                 }
             } else {
                 items = delegator.findList("ItemIssuance", shipmentIdsCond, null, UtilMisc.toList("shipmentId"), null, false);
@@ -1313,7 +1313,7 @@
 
                             // Get back the IDs of the purchase orders - this will be a list of the purchase order items which are billable by virtue of not having been
                             //  invoiced in a previous sales invoice
-                            List reverseOrderItemAssocs = EntityUtil.filterByCondition(orderItemAssocs, new EntityExpr("orderId", EntityOperator.IN, invoiceableLinkedOrderIds));
+                            List reverseOrderItemAssocs = EntityUtil.filterByCondition(orderItemAssocs, EntityCondition.makeCondition("orderId", EntityOperator.IN, invoiceableLinkedOrderIds));
                             invoiceablePrimaryOrderIds = EntityUtil.getFieldListFromEntityList(reverseOrderItemAssocs, "toOrderId", true);
                             
                         } else {
@@ -1326,14 +1326,14 @@
                         // Get the list of shipments which are associated with the filtered purchase orders
                         if (! UtilValidate.isEmpty(invoiceablePrimaryOrderIds)) {
                             List invoiceableShipmentConds = UtilMisc.toList(
-                                    new EntityExpr("primaryOrderId", EntityOperator.IN, invoiceablePrimaryOrderIds),
-                                    new EntityExpr("shipmentId", EntityOperator.IN, shipmentIds));
-                            invoiceableShipments = delegator.findList("Shipment", new EntityConditionList(invoiceableShipmentConds, EntityOperator.AND), null, null, null, false);
+                                    EntityCondition.makeCondition("primaryOrderId", EntityOperator.IN, invoiceablePrimaryOrderIds),
+                                    EntityCondition.makeCondition("shipmentId", EntityOperator.IN, shipmentIds));
+                            invoiceableShipments = delegator.findList("Shipment", EntityCondition.makeCondition(invoiceableShipmentConds, EntityOperator.AND), null, null, null, false);
                         }
                     } else {
                         List invoiceableShipmentIds = EntityUtil.getFieldListFromEntityList(toBillItems, "shipmentId", true);
                         if (! UtilValidate.isEmpty(invoiceableShipmentIds)) {
-                            invoiceableShipments = delegator.findList("Shipment", new EntityExpr("shipmentId", EntityOperator.IN, invoiceableShipmentIds), null, null, null, false);
+                            invoiceableShipments = delegator.findList("Shipment", EntityCondition.makeCondition("shipmentId", EntityOperator.IN, invoiceableShipmentIds), null, null, null, false);
                         }
                     }
                 } catch( GenericEntityException e ) {

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java Wed May 28 00:22:59 2008
@@ -22,18 +22,19 @@
 import java.sql.Timestamp;
 import java.util.Iterator;
 import java.util.List;
+
 import javolution.util.FastList;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
 import org.ofbiz.base.util.UtilNumber;
-import org.ofbiz.entity.condition.EntityConditionList;
-import org.ofbiz.entity.condition.EntityExpr;
-import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.GenericDelegator;
 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.EntityOperator;
 import org.ofbiz.entity.util.EntityUtil;
 
 /**
@@ -99,9 +100,9 @@
         List invoiceTaxItems = null;
         try {
             GenericDelegator delegator = invoice.getDelegator();
-            EntityConditionList condition = new EntityConditionList( UtilMisc.toList(
-                    new EntityExpr("invoiceId", EntityOperator.EQUALS, invoice.get("invoiceId")),
-                    new EntityExpr("invoiceItemTypeId", EntityOperator.IN, getTaxableInvoiceItemTypeIds(delegator))
+            EntityConditionList condition = EntityCondition.makeCondition( UtilMisc.toList(
+                    EntityCondition.makeCondition("invoiceId", invoice.get("invoiceId")),
+                    EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.IN, getTaxableInvoiceItemTypeIds(delegator))
                     ), EntityOperator.AND);
             invoiceTaxItems = delegator.findList("InvoiceItem", condition, null, null, null, false);
         } catch (GenericEntityException e) {
@@ -411,12 +412,12 @@
         List paymentApplications = null;
         
         // lookup payment applications which took place before the asOfDateTime for this invoice
-        EntityConditionList dateCondition = new EntityConditionList(UtilMisc.toList(
-                new EntityExpr("effectiveDate", EntityOperator.EQUALS, null),
-                new EntityExpr("effectiveDate", EntityOperator.LESS_THAN_EQUAL_TO, asOfDateTime)), EntityOperator.OR);
-        EntityConditionList conditions = new EntityConditionList(UtilMisc.toList(
+        EntityConditionList dateCondition = EntityCondition.makeCondition(UtilMisc.toList(
+                EntityCondition.makeCondition("effectiveDate", EntityOperator.EQUALS, null),
+                EntityCondition.makeCondition("effectiveDate", EntityOperator.LESS_THAN_EQUAL_TO, asOfDateTime)), EntityOperator.OR);
+        EntityConditionList conditions = EntityCondition.makeCondition(UtilMisc.toList(
                 dateCondition,
-                new EntityExpr("invoiceId", EntityOperator.EQUALS, invoiceId)),
+                EntityCondition.makeCondition("invoiceId", EntityOperator.EQUALS, invoiceId)),
                 EntityOperator.AND); 
 
         try {

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java Wed May 28 00:22:59 2008
@@ -76,9 +76,9 @@
         }
         List relatedPartyIdList = (List) agentResult.get("relatedPartyIdList");
 
-        EntityCondition barFindCond = new EntityConditionList(UtilMisc.toList(
-                new EntityExpr("partyId", EntityOperator.IN, relatedPartyIdList),
-                new EntityExpr("roleTypeId", EntityOperator.EQUALS, "BILL_TO_CUSTOMER")), EntityOperator.AND);
+        EntityCondition barFindCond = EntityCondition.makeCondition(UtilMisc.toList(
+                EntityCondition.makeCondition("partyId", EntityOperator.IN, relatedPartyIdList),
+                EntityCondition.makeCondition("roleTypeId", EntityOperator.EQUALS, "BILL_TO_CUSTOMER")), EntityOperator.AND);
         List<GenericValue> billingAccountRoleList = delegator.findList("BillingAccountRole", barFindCond, null, null, null, false);
         billingAccountRoleList = EntityUtil.filterByDate(billingAccountRoleList);
 
@@ -147,11 +147,11 @@
         BigDecimal accountLimit = getAccountLimit(billingAccount);
         balance = balance.add(accountLimit);
         // pending (not cancelled, rejected, or received) order payments
-        EntityConditionList whereConditions = new EntityConditionList(UtilMisc.toList(
-                new EntityExpr("billingAccountId", EntityOperator.EQUALS, billingAccountId),
-                new EntityExpr("paymentMethodTypeId", EntityOperator.EQUALS, "EXT_BILLACT"),
-                new EntityExpr("statusId", EntityOperator.NOT_IN, UtilMisc.toList("ORDER_CANCELLED", "ORDER_REJECTED")),
-                new EntityExpr("preferenceStatusId", EntityOperator.NOT_IN, UtilMisc.toList("PAYMENT_SETTLED", "PAYMENT_RECEIVED", "PAYMENT_DECLINED", "PAYMENT_CANCELLED")) // PAYMENT_NOT_AUTH
+        EntityConditionList whereConditions = EntityCondition.makeCondition(UtilMisc.toList(
+                EntityCondition.makeCondition("billingAccountId", EntityOperator.EQUALS, billingAccountId),
+                EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "EXT_BILLACT"),
+                EntityCondition.makeCondition("statusId", EntityOperator.NOT_IN, UtilMisc.toList("ORDER_CANCELLED", "ORDER_REJECTED")),
+                EntityCondition.makeCondition("preferenceStatusId", EntityOperator.NOT_IN, UtilMisc.toList("PAYMENT_SETTLED", "PAYMENT_RECEIVED", "PAYMENT_DECLINED", "PAYMENT_CANCELLED")) // PAYMENT_NOT_AUTH
             ), EntityOperator.AND); 
 
         List orderPaymentPreferenceSums = delegator.findList("OrderPurchasePaymentSummary", whereConditions, UtilMisc.toSet("maxAmount"), null, null, false);
@@ -213,11 +213,11 @@
      * Returns list of orders which are currently open against a billing account
      */ 
     public static List getBillingAccountOpenOrders(GenericDelegator delegator, String billingAccountId) throws GenericEntityException {
-        EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(UtilMisc.toList( 
-                new EntityExpr("billingAccountId", EntityOperator.EQUALS, billingAccountId),
-                new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
-                new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
-                new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_COMPLETED")), 
+        EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(UtilMisc.toList( 
+                EntityCondition.makeCondition("billingAccountId", EntityOperator.EQUALS, billingAccountId),
+                EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),
+                EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_CANCELLED"),
+                EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_COMPLETED")), 
                 EntityJoinOperator.AND);
         return delegator.findList("OrderHeader", ecl, null, null, null, false);
     } 

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Wed May 28 00:22:59 2008
@@ -677,19 +677,19 @@
 
         try {
             // get the valid payment prefs
-            List othExpr = UtilMisc.toList(new EntityExpr("paymentMethodTypeId", EntityOperator.EQUALS, "EFT_ACCOUNT"));
-            othExpr.add(new EntityExpr("paymentMethodTypeId", EntityOperator.EQUALS, "GIFT_CARD"));
-            othExpr.add(new EntityExpr("paymentMethodTypeId", EntityOperator.EQUALS, "FIN_ACCOUNT"));
-            EntityCondition con1 = new EntityConditionList(othExpr, EntityJoinOperator.OR);
+            List othExpr = UtilMisc.toList(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "EFT_ACCOUNT"));
+            othExpr.add(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "GIFT_CARD"));
+            othExpr.add(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, "FIN_ACCOUNT"));
+            EntityCondition con1 = EntityCondition.makeCondition(othExpr, EntityJoinOperator.OR);
 
-            EntityCondition statExpr = new EntityExpr("statusId", EntityOperator.EQUALS, "PAYMENT_SETTLED");
-            EntityCondition con2 = new EntityConditionList(UtilMisc.toList(con1, statExpr), EntityOperator.AND);
+            EntityCondition statExpr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PAYMENT_SETTLED");
+            EntityCondition con2 = EntityCondition.makeCondition(UtilMisc.toList(con1, statExpr), EntityOperator.AND);
 
-            EntityCondition authExpr = new EntityExpr("statusId", EntityOperator.EQUALS, "PAYMENT_AUTHORIZED");
-            EntityCondition con3 = new EntityConditionList(UtilMisc.toList(con2, authExpr), EntityOperator.OR);
+            EntityCondition authExpr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PAYMENT_AUTHORIZED");
+            EntityCondition con3 = EntityCondition.makeCondition(UtilMisc.toList(con2, authExpr), EntityOperator.OR);
 
-            EntityExpr orderExpr = new EntityExpr("orderId", EntityOperator.EQUALS, orderId);
-            EntityCondition con4 = new EntityConditionList(UtilMisc.toList(con3, orderExpr), EntityOperator.AND);
+            EntityExpr orderExpr = EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderId);
+            EntityCondition con4 = EntityCondition.makeCondition(UtilMisc.toList(con3, orderExpr), EntityOperator.AND);
 
             paymentPrefs = delegator.findList("OrderPaymentPreference", con4, null, null, null, false);
         } catch (GenericEntityException gee) {
@@ -1418,9 +1418,9 @@
         
         try {
             // Select all the unapplied payment applications associated to the billing account
-            List conditionList = UtilMisc.toList(new EntityExpr("billingAccountId", EntityOperator.EQUALS, billingAccountId),
-                                                  new EntityExpr("invoiceId", EntityOperator.EQUALS, GenericEntity.NULL_FIELD));
-            EntityCondition conditions = new EntityConditionList(conditionList, EntityOperator.AND);
+            List conditionList = UtilMisc.toList(EntityCondition.makeCondition("billingAccountId", EntityOperator.EQUALS, billingAccountId),
+                                                  EntityCondition.makeCondition("invoiceId", EntityOperator.EQUALS, GenericEntity.NULL_FIELD));
+            EntityCondition conditions = EntityCondition.makeCondition(conditionList, EntityOperator.AND);
 
             List paymentApplications = delegator.findList("PaymentApplication", conditions, null, UtilMisc.toList("-amountApplied"), null, false);
             if (UtilValidate.isNotEmpty(paymentApplications)) {
@@ -1846,7 +1846,7 @@
                     Long autoOrderCcTryLaterMax = productStore.getLong("autoOrderCcTryLaterMax");
                     if (autoOrderCcTryLaterMax != null) {
                         long failedTries = delegator.findCountByCondition("PaymentGatewayResponse", 
-                                new EntityFieldMap(UtilMisc.toMap(
+                                EntityCondition.makeCondition(UtilMisc.toMap(
                                         "orderPaymentPreferenceId", orderPaymentPreference.get("orderPaymentPreferenceId"), 
                                         "paymentMethodId", orderPaymentPreference.get("paymentMethodId"),
                                         "resultNsf", "Y"), 
@@ -2448,13 +2448,13 @@
         GenericValue userLogin = (GenericValue) context.get("userLogin");
 
         // get a list of all payment prefs still pending
-        List exprs = UtilMisc.toList(new EntityExpr("statusId", EntityOperator.EQUALS, "PAYMENT_NOT_AUTH"),
-                new EntityExpr("processAttempt", EntityOperator.GREATER_THAN, new Long(0)));
+        List exprs = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PAYMENT_NOT_AUTH"),
+                EntityCondition.makeCondition("processAttempt", EntityOperator.GREATER_THAN, new Long(0)));
 
         EntityListIterator eli = null;
         try {
             eli = delegator.find("OrderPaymentPreference",
-                    new EntityConditionList(exprs, EntityOperator.AND), null, null, UtilMisc.toList("orderId"), null);
+                    EntityCondition.makeCondition(exprs, EntityOperator.AND), null, null, UtilMisc.toList("orderId"), null);
             List processList = new ArrayList();
             if (eli != null) {
                 Debug.logInfo("Processing failed order re-auth(s)", module);
@@ -2501,7 +2501,7 @@
         EntityListIterator eli = null;
         try {
             eli = delegator.find("OrderPaymentPreference",
-                    new EntityExpr(new EntityExpr("needsNsfRetry", EntityOperator.EQUALS, "Y"), EntityOperator.AND, new EntityExpr(ModelEntity.STAMP_FIELD, EntityOperator.LESS_THAN_EQUAL_TO, oneWeekAgo)), 
+                    EntityCondition.makeCondition(EntityCondition.makeCondition("needsNsfRetry", EntityOperator.EQUALS, "Y"), EntityOperator.AND, EntityCondition.makeCondition(ModelEntity.STAMP_FIELD, EntityOperator.LESS_THAN_EQUAL_TO, oneWeekAgo)), 
                     null, null, UtilMisc.toList("orderId"), null);
 
             List processList = new ArrayList();
@@ -2542,7 +2542,7 @@
             List order = UtilMisc.toList("-transactionDate");
             List transactions = orderPaymentPreference.getRelated("PaymentGatewayResponse", null, order);
 
-            List exprs = UtilMisc.toList(new EntityExpr("paymentServiceTypeEnumId", EntityOperator.EQUALS, CAPTURE_SERVICE_TYPE));
+            List exprs = UtilMisc.toList(EntityCondition.makeCondition("paymentServiceTypeEnumId", EntityOperator.EQUALS, CAPTURE_SERVICE_TYPE));
 
             List capTransactions = EntityUtil.filterByAnd(transactions, exprs);
 
@@ -2565,8 +2565,8 @@
             List order = UtilMisc.toList("-transactionDate");
             List transactions = orderPaymentPreference.getRelated("PaymentGatewayResponse", null, order);
 
-            List exprs = UtilMisc.toList(new EntityExpr("paymentServiceTypeEnumId", EntityOperator.EQUALS, AUTH_SERVICE_TYPE),
-                    new EntityExpr("paymentServiceTypeEnumId", EntityOperator.EQUALS, REAUTH_SERVICE_TYPE));
+            List exprs = UtilMisc.toList(EntityCondition.makeCondition("paymentServiceTypeEnumId", EntityOperator.EQUALS, AUTH_SERVICE_TYPE),
+                    EntityCondition.makeCondition("paymentServiceTypeEnumId", EntityOperator.EQUALS, REAUTH_SERVICE_TYPE));
 
             List authTransactions = EntityUtil.filterByOr(transactions, exprs);
 

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/SimpleTaxServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/SimpleTaxServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/SimpleTaxServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/SimpleTaxServices.java Wed May 28 00:22:59 2008
@@ -114,22 +114,22 @@
         List adjustments = new ArrayList();
 
         // store expr
-        EntityCondition storeCond = new EntityExpr("productStoreId", EntityOperator.EQUALS, productStoreId);
+        EntityCondition storeCond = EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId);
 
         // build the country expressions
-        List countryExprs = UtilMisc.toList(new EntityExpr("countryGeoId", EntityOperator.EQUALS, countryCode), new EntityExpr("countryGeoId", EntityOperator.EQUALS, "_NA_"));
-        EntityCondition countryCond = new EntityConditionList(countryExprs, EntityOperator.OR);
+        List countryExprs = UtilMisc.toList(EntityCondition.makeCondition("countryGeoId", EntityOperator.EQUALS, countryCode), EntityCondition.makeCondition("countryGeoId", EntityOperator.EQUALS, "_NA_"));
+        EntityCondition countryCond = EntityCondition.makeCondition(countryExprs, EntityOperator.OR);
 
         // build the state expression
-        List stateExprs = UtilMisc.toList(new EntityExpr("stateProvinceGeoId", EntityOperator.EQUALS, stateCode), new EntityExpr("stateProvinceGeoId", EntityOperator.EQUALS, "_NA_"));
-        EntityCondition stateCond = new EntityConditionList(stateExprs, EntityOperator.OR);
+        List stateExprs = UtilMisc.toList(EntityCondition.makeCondition("stateProvinceGeoId", EntityOperator.EQUALS, stateCode), EntityCondition.makeCondition("stateProvinceGeoId", EntityOperator.EQUALS, "_NA_"));
+        EntityCondition stateCond = EntityCondition.makeCondition(stateExprs, EntityOperator.OR);
 
         // build the tax cat expression
-        List taxCatExprs = UtilMisc.toList(new EntityExpr("taxCategory", EntityOperator.EQUALS, "_NA_"));
+        List taxCatExprs = UtilMisc.toList(EntityCondition.makeCondition("taxCategory", EntityOperator.EQUALS, "_NA_"));
         if (item != null && item.get("taxCategory") != null) {
-            taxCatExprs.add(new EntityExpr("taxCategory", EntityOperator.EQUALS, item.getString("taxCategory")));
+            taxCatExprs.add(EntityCondition.makeCondition("taxCategory", EntityOperator.EQUALS, item.getString("taxCategory")));
         }
-        EntityCondition taxCatCond = new EntityConditionList(taxCatExprs, EntityOperator.OR);
+        EntityCondition taxCatCond = EntityCondition.makeCondition(taxCatExprs, EntityOperator.OR);
 
         // build the main condition clause
         List mainExprs = UtilMisc.toList(storeCond, countryCond, stateCond);
@@ -138,7 +138,7 @@
         } else {
             mainExprs.add(taxCatExprs.get(0));
         }
-        EntityCondition mainCondition = new EntityConditionList(mainExprs, EntityOperator.AND);
+        EntityCondition mainCondition = EntityCondition.makeCondition(mainExprs, EntityOperator.AND);
 
         // create the orderby clause
         List orderList = UtilMisc.toList("minItemPrice", "minPurchase", "fromDate");
@@ -222,11 +222,11 @@
                         }
 
                         List ptiConditionList = UtilMisc.toList(
-                                new EntityExpr("partyId", EntityOperator.IN, billToPartyIdSet),
-                                new EntityExpr("taxAuthGeoId", EntityOperator.EQUALS, primaryGeoId));
-                        ptiConditionList.add(new EntityExpr("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp));
-                        ptiConditionList.add(new EntityExpr(new EntityExpr("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr("thruDate", EntityOperator.GREATER_THAN, nowTimestamp)));
-                        EntityCondition ptiCondition = new EntityConditionList(ptiConditionList, EntityOperator.AND);
+                                EntityCondition.makeCondition("partyId", EntityOperator.IN, billToPartyIdSet),
+                                EntityCondition.makeCondition("taxAuthGeoId", EntityOperator.EQUALS, primaryGeoId));
+                        ptiConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp));
+                        ptiConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, nowTimestamp)));
+                        EntityCondition ptiCondition = EntityCondition.makeCondition(ptiConditionList, EntityOperator.AND);
                         // sort by -fromDate to get the newest (largest) first, just in case there is more than one, we only want the most recent valid one, should only be one per jurisdiction...
                         List partyTaxAuthInfos = delegator.findList("PartyTaxAuthInfo", ptiCondition, null, UtilMisc.toList("-fromDate"), null, false);
                         if (partyTaxAuthInfos.size() > 0) {

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java Wed May 28 00:22:59 2008
@@ -88,7 +88,7 @@
             if ("Y".equals(productStore.getString("showPricesWithVatTax"))) {
                 Set taxAuthoritySet = FastSet.newInstance();
                 if (productStore.get("vatTaxAuthPartyId") == null) {
-                    List taxAuthorityRawList = delegator.findList("TaxAuthority", new EntityExpr("taxAuthGeoId", EntityOperator.EQUALS, productStore.get("vatTaxAuthGeoId")), null, null, null, true);
+                    List taxAuthorityRawList = delegator.findList("TaxAuthority", EntityCondition.makeCondition("taxAuthGeoId", EntityOperator.EQUALS, productStore.get("vatTaxAuthGeoId")), null, null, null, true);
                     taxAuthoritySet.addAll(taxAuthorityRawList);
                 } else {
                     GenericValue taxAuthority = delegator.findByPrimaryKeyCache("TaxAuthority", UtilMisc.toMap("taxAuthGeoId", productStore.get("vatTaxAuthGeoId"), "taxAuthPartyId", productStore.get("vatTaxAuthPartyId")));
@@ -225,7 +225,7 @@
         geoIdSet = GeoWorker.expandGeoRegionDeep(geoIdSet, delegator);
         //Debug.logInfo("Tax calc geoIdSet after expand:" + geoIdSet, module);
 
-        List taxAuthorityRawList = delegator.findList("TaxAuthority", new EntityExpr("taxAuthGeoId", EntityOperator.IN, geoIdSet), null, null, null, true);
+        List taxAuthorityRawList = delegator.findList("TaxAuthority", EntityCondition.makeCondition("taxAuthGeoId", EntityOperator.IN, geoIdSet), null, null, null, true);
         taxAuthoritySet.addAll(taxAuthorityRawList);
         //Debug.logInfo("Tax calc taxAuthoritySet after expand:" + taxAuthoritySet, module);
     }
@@ -243,32 +243,32 @@
         // store expr
         EntityCondition storeCond = null;
         if (productStore != null) {
-            storeCond = new EntityExpr(
-                    new EntityExpr("productStoreId", EntityOperator.EQUALS, productStore.get("productStoreId")),
+            storeCond = EntityCondition.makeCondition(
+                    EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStore.get("productStoreId")),
                     EntityOperator.OR,
-                    new EntityExpr("productStoreId", EntityOperator.EQUALS, null));
+                    EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, null));
         } else {
-            storeCond = new EntityExpr("productStoreId", EntityOperator.EQUALS, null);
+            storeCond = EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, null);
         }
 
         // build the TaxAuthority expressions (taxAuthGeoId, taxAuthPartyId)
         List taxAuthCondOrList = FastList.newInstance();
         // start with the _NA_ TaxAuthority...
-        taxAuthCondOrList.add(new EntityExpr(
-                new EntityExpr("taxAuthPartyId", EntityOperator.EQUALS, "_NA_"), 
+        taxAuthCondOrList.add(EntityCondition.makeCondition(
+                EntityCondition.makeCondition("taxAuthPartyId", EntityOperator.EQUALS, "_NA_"), 
                 EntityOperator.AND, 
-                new EntityExpr("taxAuthGeoId", EntityOperator.EQUALS, "_NA_")));
+                EntityCondition.makeCondition("taxAuthGeoId", EntityOperator.EQUALS, "_NA_")));
         
         Iterator taxAuthorityIter = taxAuthoritySet.iterator();
         while (taxAuthorityIter.hasNext()) {
             GenericValue taxAuthority = (GenericValue) taxAuthorityIter.next();
-            EntityCondition taxAuthCond = new EntityExpr(
-                    new EntityExpr("taxAuthPartyId", EntityOperator.EQUALS, taxAuthority.getString("taxAuthPartyId")), 
+            EntityCondition taxAuthCond = EntityCondition.makeCondition(
+                    EntityCondition.makeCondition("taxAuthPartyId", EntityOperator.EQUALS, taxAuthority.getString("taxAuthPartyId")), 
                     EntityOperator.AND, 
-                    new EntityExpr("taxAuthGeoId", EntityOperator.EQUALS, taxAuthority.getString("taxAuthGeoId")));
+                    EntityCondition.makeCondition("taxAuthGeoId", EntityOperator.EQUALS, taxAuthority.getString("taxAuthGeoId")));
             taxAuthCondOrList.add(taxAuthCond);
         }
-        EntityCondition taxAuthoritiesCond = new EntityConditionList(taxAuthCondOrList, EntityOperator.OR);
+        EntityCondition taxAuthoritiesCond = EntityCondition.makeCondition(taxAuthCondOrList, EntityOperator.OR);
 
         try {
             EntityCondition productCategoryCond = null;
@@ -285,22 +285,22 @@
                 }
                 
                 if (productCategoryIdSet.size() == 0) {
-                    productCategoryCond = new EntityExpr("productCategoryId", EntityOperator.EQUALS, null);
+                    productCategoryCond = EntityCondition.makeCondition("productCategoryId", EntityOperator.EQUALS, null);
                 } else {
-                    productCategoryCond = new EntityExpr(
-                            new EntityExpr("productCategoryId", EntityOperator.EQUALS, null),
+                    productCategoryCond = EntityCondition.makeCondition(
+                            EntityCondition.makeCondition("productCategoryId", EntityOperator.EQUALS, null),
                             EntityOperator.OR,
-                            new EntityExpr("productCategoryId", EntityOperator.IN, productCategoryIdSet));
+                            EntityCondition.makeCondition("productCategoryId", EntityOperator.IN, productCategoryIdSet));
                 }
             } else {
-                productCategoryCond = new EntityExpr("productCategoryId", EntityOperator.EQUALS, null);
+                productCategoryCond = EntityCondition.makeCondition("productCategoryId", EntityOperator.EQUALS, null);
             }
 
             // build the main condition clause
             List mainExprs = UtilMisc.toList(storeCond, taxAuthoritiesCond, productCategoryCond);
-            mainExprs.add(new EntityExpr(new EntityExpr("minItemPrice", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr("minItemPrice", EntityOperator.LESS_THAN_EQUAL_TO, itemPrice)));
-            mainExprs.add(new EntityExpr(new EntityExpr("minPurchase", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr("minPurchase", EntityOperator.LESS_THAN_EQUAL_TO, itemAmount)));
-            EntityCondition mainCondition = new EntityConditionList(mainExprs, EntityOperator.AND);
+            mainExprs.add(EntityCondition.makeCondition(EntityCondition.makeCondition("minItemPrice", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("minItemPrice", EntityOperator.LESS_THAN_EQUAL_TO, itemPrice)));
+            mainExprs.add(EntityCondition.makeCondition(EntityCondition.makeCondition("minPurchase", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("minPurchase", EntityOperator.LESS_THAN_EQUAL_TO, itemAmount)));
+            EntityCondition mainCondition = EntityCondition.makeCondition(mainExprs, EntityOperator.AND);
 
             // create the orderby clause
             List orderList = UtilMisc.toList("minItemPrice", "minPurchase", "fromDate");
@@ -395,12 +395,12 @@
     private static void handlePartyTaxExempt(GenericValue adjValue, Set billToPartyIdSet, String taxAuthGeoId, String taxAuthPartyId, BigDecimal taxAmount, Timestamp nowTimestamp, GenericDelegator delegator) throws GenericEntityException {
         Debug.logInfo("Checking for tax exemption : " + taxAuthGeoId + " / " + taxAuthPartyId, module);
         List ptiConditionList = UtilMisc.toList(
-                new EntityExpr("partyId", EntityOperator.IN, billToPartyIdSet),
-                new EntityExpr("taxAuthGeoId", EntityOperator.EQUALS, taxAuthGeoId),
-                new EntityExpr("taxAuthPartyId", EntityOperator.EQUALS, taxAuthPartyId));
-        ptiConditionList.add(new EntityExpr("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp));
-        ptiConditionList.add(new EntityExpr(new EntityExpr("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr("thruDate", EntityOperator.GREATER_THAN, nowTimestamp)));
-        EntityCondition ptiCondition = new EntityConditionList(ptiConditionList, EntityOperator.AND);
+                EntityCondition.makeCondition("partyId", EntityOperator.IN, billToPartyIdSet),
+                EntityCondition.makeCondition("taxAuthGeoId", EntityOperator.EQUALS, taxAuthGeoId),
+                EntityCondition.makeCondition("taxAuthPartyId", EntityOperator.EQUALS, taxAuthPartyId));
+        ptiConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp));
+        ptiConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, nowTimestamp)));
+        EntityCondition ptiCondition = EntityCondition.makeCondition(ptiConditionList, EntityOperator.AND);
         // sort by -fromDate to get the newest (largest) first, just in case there is more than one, we only want the most recent valid one, should only be one per jurisdiction...
         List partyTaxInfos = delegator.findList("PartyTaxAuthInfo", ptiCondition, null, UtilMisc.toList("-fromDate"), null, false);
 

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listInvoiceItemTypesGlAccount.bsh Wed May 28 00:22:59 2008
@@ -27,7 +27,7 @@
 delegator = parameters.get("delegator");
 organizationPartyId = parameters.get("organizationPartyId");
 
-List invoiceItemTypes = delegator.findList("InvoiceItemType", new EntityExpr("invoiceItemTypeId", EntityOperator.LIKE, "INV_%"), null, null, null, false);
+List invoiceItemTypes = delegator.findList("InvoiceItemType", EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.LIKE, "INV_%"), null, null, null, false);
 List allTypes = new LinkedList();
 i = invoiceItemTypes.iterator();
 while(i.hasNext()) {

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/admin/listPurInvoiceItemTypesGlAccount.bsh Wed May 28 00:22:59 2008
@@ -27,7 +27,7 @@
 delegator = parameters.get("delegator");
 organizationPartyId = parameters.get("organizationPartyId");
 
-List invoiceItemTypes = delegator.findList("InvoiceItemType", new EntityExpr("invoiceItemTypeId", EntityOperator.LIKE, "PINV_%"), null, null, null, false);
+List invoiceItemTypes = delegator.findList("InvoiceItemType", EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.LIKE, "PINV_%"), null, null, null, false);
 List allTypes = new LinkedList();
 i = invoiceItemTypes.iterator();
 while(i.hasNext()) {

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/findInvoices.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/findInvoices.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/findInvoices.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/findInvoices.bsh Wed May 28 00:22:59 2008
@@ -94,31 +94,31 @@
                 
         paramList = paramList + "&invoiceTypeId=" + invoiceType;        
         if (!"ANY".equals(invoiceType)) {            
-            andExprs.add(new EntityExpr("invoiceTypeId", EntityOperator.EQUALS, invoiceType));
+            andExprs.add(EntityCondition.makeCondition("invoiceTypeId", EntityOperator.EQUALS, invoiceType));
         }
         paramList = paramList + "&invoiceStatusId=" + invoiceStatus;
         if (!"ANY". equals(invoiceStatus)) {            
-            andExprs.add(new EntityExpr("statusId", EntityOperator.EQUALS, invoiceStatus));
+            andExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, invoiceStatus));
         }
         if (billAcct != null && billAcct.length() > 0) {
             paramList = paramList + "&billingAccountId=" + billAcct;
-            andExprs.add(new EntityExpr("billingAccountId", EntityOperator.EQUALS, billAcct));
+            andExprs.add(EntityCondition.makeCondition("billingAccountId", EntityOperator.EQUALS, billAcct));
         }     
        
         if (minDate != null && minDate.length() > 8) {            
             minDate = minDate.trim();
             if (minDate.length() < 14) minDate = minDate + " " + "00:00:00.000";
             paramList = paramList + "&minDate=" + minDate;
-            andExprs.add(new EntityExpr("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(minDate, "Timestamp", null, null)));        
+            andExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(minDate, "Timestamp", null, null)));        
         }
         if (maxDate != null && maxDate.length() > 8) {
             maxDate = maxDate.trim();
             if (maxDate.length() < 14) maxDate = maxDate + " " + "23:59:59.999";
             paramList = paramList + "&maxDate=" + maxDate;
-            andExprs.add(new EntityExpr("invoiceDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(maxDate, "Timestamp", null, null)));
+            andExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(maxDate, "Timestamp", null, null)));
         }
                 
-        mainCond = new EntityConditionList(andExprs, EntityOperator.AND);        
+        mainCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND);        
                                                        
     }
     

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/getInvoiceItemTypes.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/getInvoiceItemTypes.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/getInvoiceItemTypes.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/getInvoiceItemTypes.bsh Wed May 28 00:22:59 2008
@@ -30,18 +30,18 @@
 glAccountOrganizationAndClassList = null;
 if ("SALES_INVOICE".equals(invoice.get("invoiceTypeId"))) {
     List parentTypes = FastList.newInstance();
-    parentTypes.add(new EntityExpr("parentTypeId", EntityOperator.EQUALS, "INVOICE_ADJ"));
-    parentTypes.add(new EntityExpr("parentTypeId", EntityOperator.EQUALS, "INVOICE_ITM_ADJ"));
-    parentTypes.add(new EntityExpr("parentTypeId", EntityOperator.EQUALS, "INV_PROD_ITEM"));
-    parentTypesCond = new EntityConditionList(parentTypes, EntityOperator.OR);
+    parentTypes.add(EntityCondition.makeCondition("parentTypeId", EntityOperator.EQUALS, "INVOICE_ADJ"));
+    parentTypes.add(EntityCondition.makeCondition("parentTypeId", EntityOperator.EQUALS, "INVOICE_ITM_ADJ"));
+    parentTypes.add(EntityCondition.makeCondition("parentTypeId", EntityOperator.EQUALS, "INV_PROD_ITEM"));
+    parentTypesCond = EntityCondition.makeCondition(parentTypes, EntityOperator.OR);
     invoiceItemTypes = delegator.findList("InvoiceItemType", parentTypesCond, null, UtilMisc.toList("parentTypeId", "invoiceItemTypeId"), null, false);
     glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", UtilMisc.toMap("organizationPartyId", invoice.get("partyIdFrom")));
 } else if ("PURCHASE_INVOICE".equals(invoice.get("invoiceTypeId"))) {
     List parentTypes = FastList.newInstance();
-    parentTypes.add(new EntityExpr("parentTypeId", EntityOperator.EQUALS, "PINVOICE_ADJ"));
-    parentTypes.add(new EntityExpr("parentTypeId", EntityOperator.EQUALS, "PINVOICE_ITM_ADJ"));
-    parentTypes.add(new EntityExpr("parentTypeId", EntityOperator.EQUALS, "PINV_PROD_ITEM"));
-    parentTypesCond = new EntityConditionList(parentTypes, EntityOperator.OR);
+    parentTypes.add(EntityCondition.makeCondition("parentTypeId", EntityOperator.EQUALS, "PINVOICE_ADJ"));
+    parentTypes.add(EntityCondition.makeCondition("parentTypeId", EntityOperator.EQUALS, "PINVOICE_ITM_ADJ"));
+    parentTypes.add(EntityCondition.makeCondition("parentTypeId", EntityOperator.EQUALS, "PINV_PROD_ITEM"));
+    parentTypesCond = EntityCondition.makeCondition(parentTypes, EntityOperator.OR);
     invoiceItemTypes = delegator.findList("InvoiceItemType", parentTypesCond, null, UtilMisc.toList("parentTypeId", "invoiceItemTypeId"), null, false);
     glAccountOrganizationAndClassList = delegator.findByAnd("GlAccountOrganizationAndClass", UtilMisc.toMap("organizationPartyId", invoice.get("partyId")));
 } else {

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh Wed May 28 00:22:59 2008
@@ -45,23 +45,23 @@
 List payments = null;
 GenericValue payment = null;
 exprList = new ArrayList();
-expr = new EntityExpr("partyIdTo", EntityOperator.EQUALS, invoice.getString("partyIdFrom"));
+expr = EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, invoice.getString("partyIdFrom"));
 exprList.add(expr); 
-expr = new EntityExpr("partyIdFrom", EntityOperator.EQUALS, invoice.getString("partyId"));
+expr = EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, invoice.getString("partyId"));
 exprList.add(expr); 
 
 // only payments with received and sent and not paid
 exprListStatus = new ArrayList();
-expr = new EntityExpr("statusId", EntityOperator.EQUALS, "PMNT_NOT_PAID");
+expr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_NOT_PAID");
 exprListStatus.add(expr); 
-expr = new EntityExpr("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED");
+expr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED");
 exprListStatus.add(expr); 
-expr = new EntityExpr("statusId", EntityOperator.EQUALS, "PMNT_SENT");
+expr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_SENT");
 exprListStatus.add(expr);
-orCond = new EntityConditionList(exprListStatus, EntityOperator.OR);
+orCond = EntityCondition.makeCondition(exprListStatus, EntityOperator.OR);
 exprList.add(orCond); 
 
-topCond = new EntityConditionList(exprList, EntityOperator.AND);
+topCond = EntityCondition.makeCondition(exprList, EntityOperator.AND);
 
 payments = delegator.findList("Payment", topCond, null, UtilMisc.toList("effectiveDate"), null, false);
 if (payments != null && payments.size() > 0)    {

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/findPayment.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/findPayment.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/findPayment.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/findPayment.bsh Wed May 28 00:22:59 2008
@@ -109,26 +109,26 @@
                 
         paramList = paramList + "&paymentTypeId=" + paymentType;        
         if (!"ANY".equals(paymentType)) {            
-            andExprs.add(new EntityExpr("paymentTypeId", EntityOperator.EQUALS, paymentType));
+            andExprs.add(EntityCondition.makeCondition("paymentTypeId", EntityOperator.EQUALS, paymentType));
         }
         paramList = paramList + "&paymentStatusId=" + paymentStatus;
         if (!"ANY".equals(paymentStatus)) {            
-            andExprs.add(new EntityExpr("statusId", EntityOperator.EQUALS, paymentStatus));
+            andExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, paymentStatus));
         }
         paramList = paramList + "&paymentMethodTypeId=" + paymentMethodType;
         if (!"ANY".equals(paymentMethodType)) {            
-            andExprs.add(new EntityExpr("paymentMethodTypeId", EntityOperator.EQUALS, paymentMethodType));
+            andExprs.add(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, paymentMethodType));
         }
         
         if (UtilValidate.isNotEmpty(fromPartyId)) {
             paramList = paramList + "&fromPartyId=" + fromPartyId;
-            andExprs.add(new EntityExpr("partyIdFrom", EntityOperator.EQUALS, fromPartyId));
+            andExprs.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, fromPartyId));
             context.put("fromPartyId", fromPartyId);
         }
         
         if (UtilValidate.isNotEmpty(toPartyId)) {
             paramList = paramList + "&toPartyId=" + toPartyId;
-            andExprs.add(new EntityExpr("partyIdTo", EntityOperator.EQUALS, toPartyId));
+            andExprs.add(EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, toPartyId));
             context.put("toPartyId", toPartyId);
         }
        
@@ -136,16 +136,16 @@
             minDate = minDate.trim();
             if (minDate.length() < 14) minDate = minDate + " " + "00:00:00.000";
             paramList = paramList + "&minDate=" + minDate;
-            andExprs.add(new EntityExpr("effectiveDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(minDate, "Timestamp", null, null)));        
+            andExprs.add(EntityCondition.makeCondition("effectiveDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(minDate, "Timestamp", null, null)));        
         }
         if (maxDate != null && maxDate.length() > 8) {
             maxDate = maxDate.trim();
             if (maxDate.length() < 14) maxDate = maxDate + " " + "23:59:59.999";
             paramList = paramList + "&maxDate=" + maxDate;
-            andExprs.add(new EntityExpr("effectiveDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(maxDate, "Timestamp", null, null)));
+            andExprs.add(EntityCondition.makeCondition("effectiveDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(maxDate, "Timestamp", null, null)));
         }
                 
-        mainCond = new EntityConditionList(andExprs, EntityOperator.AND);        
+        mainCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND);        
                                                        
     }
     

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/listNotAppliedPayments.bsh Wed May 28 00:22:59 2008
@@ -46,23 +46,23 @@
 List payments = null;
 GenericValue payment = null;
 exprList = new ArrayList();
-expr = new EntityExpr("partyIdTo", EntityOperator.EQUALS, basePayment.getString("partyIdFrom"));
+expr = EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, basePayment.getString("partyIdFrom"));
 exprList.add(expr); 
-expr = new EntityExpr("partyIdFrom", EntityOperator.EQUALS, basePayment.getString("partyIdTo"));
+expr = EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, basePayment.getString("partyIdTo"));
 exprList.add(expr); 
-expr = new EntityExpr("paymentId", EntityOperator.NOT_EQUAL, basePayment.getString("paymentId"));
+expr = EntityCondition.makeCondition("paymentId", EntityOperator.NOT_EQUAL, basePayment.getString("paymentId"));
 exprList.add(expr); 
 
 // only payments with received and sent
 exprListStatus = new ArrayList();
-expr = new EntityExpr("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED");
+expr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED");
 exprListStatus.add(expr); 
-expr = new EntityExpr("statusId", EntityOperator.EQUALS, "PMNT_SENT");
+expr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_SENT");
 exprListStatus.add(expr);
-orCond = new EntityConditionList(exprListStatus, EntityOperator.OR);
+orCond = EntityCondition.makeCondition(exprListStatus, EntityOperator.OR);
 exprList.add(orCond); 
 
-topCond = new EntityConditionList(exprList, EntityOperator.AND);
+topCond = EntityCondition.makeCondition(exprList, EntityOperator.AND);
 
 payments = delegator.findList("Payment", topCond, null, UtilMisc.toList("effectiveDate"), null, false);
     

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/SalesInvoiceByProductCategorySummary.bsh Wed May 28 00:22:59 2008
@@ -63,22 +63,22 @@
 
 //NOTE: tax, etc also have productId on them, so restrict by type INV_PROD_ITEM, INV_FPROD_ITEM, INV_DPROD_ITEM, others?
 baseProductAndExprs = FastList.newInstance();
-baseProductAndExprs.add(new EntityExpr("invoiceTypeId", EntityOperator.EQUALS, "SALES_INVOICE"));
-baseProductAndExprs.add(new EntityExpr("invoiceItemTypeId", EntityOperator.IN, UtilMisc.toList("INV_PROD_ITEM", "INV_FPROD_ITEM", "INV_DPROD_ITEM")));
-baseProductAndExprs.add(new EntityExpr("statusId", EntityOperator.IN, UtilMisc.toList("INVOICE_READY", "INVOICE_PAID")));
-if (UtilValidate.isNotEmpty(organizationPartyId)) baseProductAndExprs.add(new EntityExpr("partyIdFrom", EntityOperator.EQUALS, organizationPartyId));
-if (UtilValidate.isNotEmpty(currencyUomId)) baseProductAndExprs.add(new EntityExpr("currencyUomId", EntityOperator.EQUALS, currencyUomId));
+baseProductAndExprs.add(EntityCondition.makeCondition("invoiceTypeId", EntityOperator.EQUALS, "SALES_INVOICE"));
+baseProductAndExprs.add(EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.IN, UtilMisc.toList("INV_PROD_ITEM", "INV_FPROD_ITEM", "INV_DPROD_ITEM")));
+baseProductAndExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.IN, UtilMisc.toList("INVOICE_READY", "INVOICE_PAID")));
+if (UtilValidate.isNotEmpty(organizationPartyId)) baseProductAndExprs.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, organizationPartyId));
+if (UtilValidate.isNotEmpty(currencyUomId)) baseProductAndExprs.add(EntityCondition.makeCondition("currencyUomId", EntityOperator.EQUALS, currencyUomId));
 
 categoryFieldsToSelect = UtilMisc.toSet("productCategoryId", "quantityTotal", "amountTotal");
 
 baseCategoryAndExprs = FastList.newInstance();
-baseCategoryAndExprs.add(new EntityExpr("invoiceTypeId", EntityOperator.EQUALS, "SALES_INVOICE"));
-baseCategoryAndExprs.add(new EntityExpr("invoiceItemTypeId", EntityOperator.IN, UtilMisc.toList("INV_PROD_ITEM", "INV_FPROD_ITEM", "INV_DPROD_ITEM")));
-baseCategoryAndExprs.add(new EntityExpr("statusId", EntityOperator.IN, UtilMisc.toList("INVOICE_READY", "INVOICE_PAID")));
-if (productCategoryIdSet.size() > 0) baseCategoryAndExprs.add(new EntityExpr("productCategoryId", EntityOperator.IN, productCategoryIdSet));
-if (productIdSet.size() > 0) baseCategoryAndExprs.add(new EntityExpr("productId", EntityOperator.NOT_IN, productIdSet));
-if (UtilValidate.isNotEmpty(organizationPartyId)) baseCategoryAndExprs.add(new EntityExpr("partyIdFrom", EntityOperator.EQUALS, organizationPartyId));
-if (UtilValidate.isNotEmpty(currencyUomId)) baseCategoryAndExprs.add(new EntityExpr("currencyUomId", EntityOperator.EQUALS, currencyUomId));
+baseCategoryAndExprs.add(EntityCondition.makeCondition("invoiceTypeId", EntityOperator.EQUALS, "SALES_INVOICE"));
+baseCategoryAndExprs.add(EntityCondition.makeCondition("invoiceItemTypeId", EntityOperator.IN, UtilMisc.toList("INV_PROD_ITEM", "INV_FPROD_ITEM", "INV_DPROD_ITEM")));
+baseCategoryAndExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.IN, UtilMisc.toList("INVOICE_READY", "INVOICE_PAID")));
+if (productCategoryIdSet.size() > 0) baseCategoryAndExprs.add(EntityCondition.makeCondition("productCategoryId", EntityOperator.IN, productCategoryIdSet));
+if (productIdSet.size() > 0) baseCategoryAndExprs.add(EntityCondition.makeCondition("productId", EntityOperator.NOT_IN, productIdSet));
+if (UtilValidate.isNotEmpty(organizationPartyId)) baseCategoryAndExprs.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, organizationPartyId));
+if (UtilValidate.isNotEmpty(currencyUomId)) baseCategoryAndExprs.add(EntityCondition.makeCondition("currencyUomId", EntityOperator.EQUALS, currencyUomId));
 
 
 // get the Calendar object for the current month (specifed by month, year Integer values in the context)
@@ -113,11 +113,11 @@
     // do the product find
     productAndExprs = FastList.newInstance();
     productAndExprs.addAll(baseProductAndExprs);
-    if (productIdSet.size() > 0) productAndExprs.add(new EntityExpr("productId", EntityOperator.IN, productIdSet));
-    productAndExprs.add(new EntityExpr("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin));
-    productAndExprs.add(new EntityExpr("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin));
+    if (productIdSet.size() > 0) productAndExprs.add(EntityCondition.makeCondition("productId", EntityOperator.IN, productIdSet));
+    productAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin));
+    productAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin));
     
-    productResultListIterator = delegator.find("InvoiceItemProductSummary", new EntityConditionList(productAndExprs, EntityOperator.AND), null, productFieldsToSelect, null, findOpts);
+    productResultListIterator = delegator.find("InvoiceItemProductSummary", EntityCondition.makeCondition(productAndExprs, EntityOperator.AND), null, productFieldsToSelect, null, findOpts);
     productResultMap = FastMap.newInstance();
     while ((productResult = productResultListIterator.next()) != null) {
         productResultMap.put(productResult.get("productId"), productResult);
@@ -131,10 +131,10 @@
     // do the category find
     categoryAndExprs = FastList.newInstance();
     categoryAndExprs.addAll(baseCategoryAndExprs);
-    categoryAndExprs.add(new EntityExpr("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin));
-    categoryAndExprs.add(new EntityExpr("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin));
+    categoryAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin));
+    categoryAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin));
     
-    categoryResultListIterator = delegator.find("InvoiceItemCategorySummary", new EntityConditionList(categoryAndExprs, EntityOperator.AND), null, categoryFieldsToSelect, null, findOpts);
+    categoryResultListIterator = delegator.find("InvoiceItemCategorySummary", EntityCondition.makeCondition(categoryAndExprs, EntityOperator.AND), null, categoryFieldsToSelect, null, findOpts);
     categoryResultMap = FastMap.newInstance();
     while ((categoryResult = categoryResultListIterator.next()) != null) {
         categoryResultMap.put(categoryResult.get("productCategoryId"), categoryResult);
@@ -148,10 +148,10 @@
     // do a find for InvoiceItem with a null productId
     productNullAndExprs = FastList.newInstance();
     productNullAndExprs.addAll(baseProductAndExprs);
-    productNullAndExprs.add(new EntityExpr("productId", EntityOperator.EQUALS, null));
-    productNullAndExprs.add(new EntityExpr("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin));
-    productNullAndExprs.add(new EntityExpr("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin));
-    productNullResultListIterator = delegator.find("InvoiceItemProductSummary", new EntityConditionList(productNullAndExprs, EntityOperator.AND), null, productFieldsToSelect, null, findOpts);
+    productNullAndExprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, null));
+    productNullAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.GREATER_THAN_EQUAL_TO, currentDayBegin));
+    productNullAndExprs.add(EntityCondition.makeCondition("invoiceDate", EntityOperator.LESS_THAN, nextDayBegin));
+    productNullResultListIterator = delegator.find("InvoiceItemProductSummary", EntityCondition.makeCondition(productNullAndExprs, EntityOperator.AND), null, productFieldsToSelect, null, findOpts);
     // should just be 1 result
     productNullResult = productNullResultListIterator.next();
     productNullResultListIterator.close();

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/TransactionTotals.bsh Wed May 28 00:22:59 2008
@@ -28,22 +28,22 @@
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
-exprs = UtilMisc.toList(new EntityExpr("organizationPartyId", EntityOperator.EQUALS, organizationPartyId));
+exprs = UtilMisc.toList(EntityCondition.makeCondition("organizationPartyId", EntityOperator.EQUALS, organizationPartyId));
 if (UtilValidate.isNotEmpty(fromDate)) {
-    exprs.add(new EntityExpr("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
+    exprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
 }
 if (UtilValidate.isNotEmpty(thruDate)) {
-    exprs.add(new EntityExpr("transactionDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate));
+    exprs.add(EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate));
 }
 
 List postedExprs = FastList.newInstance();
-postedExprs.add(new EntityExpr("isPosted", EntityOperator.EQUALS, "Y"));
+postedExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "Y"));
 postedExprs.addAll(exprs);
 fieldsToSelect = UtilMisc.toSet("glAccountId", "debitCreditFlag", "totalAmount");
 orderBy = UtilMisc.toList("glAccountId");
 
 List postedTransTotalList = FastList.newInstance();
-List postedTrans = delegator.findList("GlAccOrgAndAcctgTransAndEntry", new EntityConditionList(postedExprs, EntityOperator.AND), fieldsToSelect, orderBy, null, false);
+List postedTrans = delegator.findList("GlAccOrgAndAcctgTransAndEntry", EntityCondition.makeCondition(postedExprs, EntityOperator.AND), fieldsToSelect, orderBy, null, false);
 if (UtilValidate.isNotEmpty(postedTrans)) {
     iter = postedTrans.iterator();
     while (iter.hasNext()) {
@@ -63,11 +63,11 @@
 context.put("postedTransTotalList", postedTransTotalList);
 
 List unpostedExprs = FastList.newInstance();
-unpostedExprs.add(new EntityExpr("isPosted", EntityOperator.EQUALS, "N"));
+unpostedExprs.add(EntityCondition.makeCondition("isPosted", EntityOperator.EQUALS, "N"));
 unpostedExprs.addAll(exprs);
 
 List unpostedTransTotalList = FastList.newInstance();
-List unpostedTrans = delegator.findList("GlAccOrgAndAcctgTransAndEntry", new EntityConditionList(unpostedExprs, EntityOperator.AND), fieldsToSelect, orderBy, null, false);
+List unpostedTrans = delegator.findList("GlAccOrgAndAcctgTransAndEntry", EntityCondition.makeCondition(unpostedExprs, EntityOperator.AND), fieldsToSelect, orderBy, null, false);
 if (UtilValidate.isNotEmpty(unpostedTrans)) {
     iter = unpostedTrans.iterator();
     while (iter.hasNext()) {

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureTransaction.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureTransaction.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureTransaction.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/captureTransaction.bsh Wed May 28 00:22:59 2008
@@ -49,7 +49,7 @@
 if(orderPaymentPreference != null){
 // we retrieve the captureAmount by looking at the latest authorized gateway response for this orderPaymentPreference
 gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse", UtilMisc.toList("transactionDate DESC"));
-EntityUtil.filterByCondition(gatewayResponses, new EntityExpr("transCodeEnumId", EntityOperator.EQUALS, "PGT_AUTHORIZE"));
+EntityUtil.filterByCondition(gatewayResponses, EntityCondition.makeCondition("transCodeEnumId", EntityOperator.EQUALS, "PGT_AUTHORIZE"));
 
 if (gatewayResponses != null && gatewayResponses.size() > 0) {
     latestAuth = gatewayResponses.get(0);

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/viewGatewayResponse.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/viewGatewayResponse.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/viewGatewayResponse.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/transaction/viewGatewayResponse.bsh Wed May 28 00:22:59 2008
@@ -45,7 +45,7 @@
 // second purpose: grab the latest gateway response of the orderaymentpreferenceId
 orderPaymentPreference = delegator.findByPrimaryKey("OrderPaymentPreference", UtilMisc.toMap("orderPaymentPreferenceId", orderPaymentPreferenceId));
 gatewayResponses = orderPaymentPreference.getRelated("PaymentGatewayResponse", UtilMisc.toList("transactionDate DESC"));
-EntityUtil.filterByCondition(gatewayResponses, new EntityExpr("transCodeEnumId", EntityOperator.EQUALS, "PGT_AUTHORIZE"));
+EntityUtil.filterByCondition(gatewayResponses, EntityCondition.makeCondition("transCodeEnumId", EntityOperator.EQUALS, "PGT_AUTHORIZE"));
 
 if (gatewayResponses.size() > 0) {
     latestAuth = gatewayResponses.get(0);

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=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/month.bsh (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/fixedasset/month.bsh Wed May 28 00:22:59 2008
@@ -54,10 +54,10 @@
 nextMonth = UtilDateTime.getMonthStart(UtilDateTime.getMonthStart(now, 35));
 
 condition = new ArrayList();
-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));
-EntityConditionList ecl = new EntityConditionList(condition, EntityOperator.AND);
+condition.add(EntityCondition.makeCondition("calendarId", EntityOperator.EQUALS, fixedAsset.getString("calendarId")));
+condition.add(EntityCondition.makeCondition("exceptionDateStartTime",EntityOperator.GREATER_THAN, now));
+condition.add(EntityCondition.makeCondition("exceptionDateStartTime",EntityOperator.LESS_THAN, nextMonth));
+EntityConditionList ecl = EntityCondition.makeCondition(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

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Wed May 28 00:22:59 2008
@@ -909,11 +909,11 @@
         Iterator iterType = typeList.iterator();
         while (iterType.hasNext()) {
             String type = (String)iterType.next();
-            condList.add(new EntityExpr("contentAssocTypeId", EntityOperator.EQUALS, type));
+            condList.add(EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.EQUALS, type));
         }
         
-        EntityCondition conditionType = new EntityConditionList(condList, EntityOperator.OR);
-        EntityCondition conditionMain = new EntityConditionList(UtilMisc.toList( new EntityExpr("contentIdTo", EntityOperator.EQUALS, contentIdTo), conditionType), EntityOperator.AND);
+        EntityCondition conditionType = EntityCondition.makeCondition(condList, EntityOperator.OR);
+        EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentIdTo), conditionType), EntityOperator.AND);
          try {
              List listAll = delegator.findList("ContentAssoc", conditionMain, null, UtilMisc.toList("sequenceNum", "fromDate", "createdDate"), null, false);
              List listFiltered = EntityUtil.filterByDate(listAll);
@@ -1087,11 +1087,11 @@
            Iterator iterType = typeList.iterator();
            while (iterType.hasNext()) {
                String type = (String)iterType.next();
-               condList.add(new EntityExpr("contentAssocTypeId", EntityOperator.EQUALS, type));
+               condList.add(EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.EQUALS, type));
            }
            
-           EntityCondition conditionType = new EntityConditionList(condList, EntityOperator.OR);
-           EntityCondition conditionMain = new EntityConditionList(UtilMisc.toList( new EntityExpr("contentId", EntityOperator.EQUALS, thisContentId), conditionType), EntityOperator.AND);
+           EntityCondition conditionType = EntityCondition.makeCondition(condList, EntityOperator.OR);
+           EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, thisContentId), conditionType), EntityOperator.AND);
             List listAll = delegator.findByConditionCache("ContentAssoc", conditionMain, null, null);
             List listFiltered = EntityUtil.filterByDate(listAll);
             Iterator iter = listFiltered.iterator();
@@ -1333,13 +1333,13 @@
         GenericDelegator delegator = dctx.getDelegator();
         String contentIdTo = (String)context.get("contentId");
         List condList = new ArrayList();
-        EntityExpr expr = new EntityExpr("caContentIdTo", EntityOperator.EQUALS, contentIdTo);
+        EntityExpr expr = EntityCondition.makeCondition("caContentIdTo", EntityOperator.EQUALS, contentIdTo);
         condList.add(expr);
-        expr = new EntityExpr("caContentAssocTypeId", EntityOperator.EQUALS, "SUB_CONTENT");
+        expr = EntityCondition.makeCondition("caContentAssocTypeId", EntityOperator.EQUALS, "SUB_CONTENT");
         condList.add(expr);
-        expr = new EntityExpr("caThruDate", EntityOperator.EQUALS, null);
+        expr = EntityCondition.makeCondition("caThruDate", EntityOperator.EQUALS, null);
         condList.add(expr);
-        EntityConditionList entityCondList = new EntityConditionList(condList, EntityOperator.AND);
+        EntityConditionList entityCondList = EntityCondition.makeCondition(condList, EntityOperator.AND);
          try {
              List lst = delegator.findList("ContentAssocDataResourceViewFrom", entityCondList, null, UtilMisc.toList("caSequenceNum", "caFromDate", "createdDate"), null, false);
              results.put("_LIST_", lst);
@@ -1558,7 +1558,7 @@
             List lst = delegator.findByAndCache("ProductContent", UtilMisc.toMap("productId", productId, "productContentTypeId", "ONLINE_ACCESS"));
             List listFiltered = EntityUtil.filterByDate(lst, orderCreatedDate, "purchaseFromDate", "purchaseThruDate", true);
             List listOrdered = EntityUtil.orderBy(listFiltered, UtilMisc.toList("purchaseFromDate", "purchaseThruDate"));
-            List listThrusOnly = EntityUtil.filterOutByCondition(listOrdered, new EntityExpr("purchaseThruDate", EntityOperator.EQUALS, null));
+            List listThrusOnly = EntityUtil.filterOutByCondition(listOrdered, EntityCondition.makeCondition("purchaseThruDate", EntityOperator.EQUALS, null));
             if (listThrusOnly.size() > 0) {
                 productContent = (GenericValue) listThrusOnly.get(0);   
             } else {