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 [6/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...
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java Wed May 28 00:22:59 2008
@@ -55,21 +55,21 @@
List conditionList2 = new ArrayList();
// we are only concerned about approved sales orders
- conditionList2.add(new EntityExpr("statusId", EntityOperator.EQUALS, "ORDER_APPROVED"));
- conditionList2.add(new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"));
+ conditionList2.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ORDER_APPROVED"));
+ conditionList2.add(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"));
// build the expression list from the IDs
Iterator i = orderIdList.iterator();
while (i.hasNext()) {
String orderId = (String) i.next();
- conditionList1.add(new EntityExpr("orderId", EntityOperator.EQUALS, orderId));
+ conditionList1.add(EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderId));
}
// create the conditions
- EntityCondition idCond = new EntityConditionList(conditionList1, EntityOperator.OR);
+ EntityCondition idCond = EntityCondition.makeCondition(conditionList1, EntityOperator.OR);
conditionList2.add(idCond);
- EntityCondition cond = new EntityConditionList(conditionList2, EntityOperator.AND);
+ EntityCondition cond = EntityCondition.makeCondition(conditionList2, EntityOperator.AND);
// run the query
try {
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java Wed May 28 00:22:59 2008
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -15,35 +15,49 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *******************************************************************************/
+ */
package org.ofbiz.shipment.thirdparty.fedex;
-import org.ofbiz.base.util.*;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.ofbiz.base.util.Base64;
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.HttpClient;
+import org.ofbiz.base.util.HttpClientException;
+import org.ofbiz.base.util.UtilDateTime;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.base.util.UtilXml;
import org.ofbiz.base.util.template.FreeMarkerWorker;
-import org.ofbiz.service.DispatchContext;
-import org.ofbiz.service.ServiceUtil;
-import org.ofbiz.service.LocalDispatcher;
-import org.ofbiz.service.GenericServiceException;
-import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
-import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
import org.ofbiz.entity.condition.EntityOperator;
-import org.ofbiz.entity.condition.EntityConditionList;
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.party.party.PartyHelper;
+import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.GenericServiceException;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
-import javax.xml.parsers.ParserConfigurationException;
-import java.util.*;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-
/**
* Fedex Shipment Services
*
@@ -177,26 +191,26 @@
// Get the first valid postal address (address1, city, postalCode and countryGeoId are required by Fedex)
List postalAddressConditions = new ArrayList();
- postalAddressConditions.add(new EntityExpr("contactMechTypeId", EntityOperator.EQUALS, "POSTAL_ADDRESS"));
- postalAddressConditions.add(new EntityExpr("address1", EntityOperator.NOT_EQUAL, null));
- postalAddressConditions.add(new EntityExpr("address1", EntityOperator.NOT_EQUAL, ""));
- postalAddressConditions.add(new EntityExpr("city", EntityOperator.NOT_EQUAL, null));
- postalAddressConditions.add(new EntityExpr("city", EntityOperator.NOT_EQUAL, ""));
- postalAddressConditions.add(new EntityExpr("postalCode", EntityOperator.NOT_EQUAL, null));
- postalAddressConditions.add(new EntityExpr("postalCode", EntityOperator.NOT_EQUAL, ""));
- postalAddressConditions.add(new EntityExpr("countryGeoId", EntityOperator.NOT_EQUAL, null));
- postalAddressConditions.add(new EntityExpr("countryGeoId", EntityOperator.NOT_EQUAL, ""));
- List postalAddresses = EntityUtil.filterByCondition(partyContactDetails, new EntityConditionList(postalAddressConditions, EntityOperator.AND));
+ postalAddressConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "POSTAL_ADDRESS"));
+ postalAddressConditions.add(EntityCondition.makeCondition("address1", EntityOperator.NOT_EQUAL, null));
+ postalAddressConditions.add(EntityCondition.makeCondition("address1", EntityOperator.NOT_EQUAL, ""));
+ postalAddressConditions.add(EntityCondition.makeCondition("city", EntityOperator.NOT_EQUAL, null));
+ postalAddressConditions.add(EntityCondition.makeCondition("city", EntityOperator.NOT_EQUAL, ""));
+ postalAddressConditions.add(EntityCondition.makeCondition("postalCode", EntityOperator.NOT_EQUAL, null));
+ postalAddressConditions.add(EntityCondition.makeCondition("postalCode", EntityOperator.NOT_EQUAL, ""));
+ postalAddressConditions.add(EntityCondition.makeCondition("countryGeoId", EntityOperator.NOT_EQUAL, null));
+ postalAddressConditions.add(EntityCondition.makeCondition("countryGeoId", EntityOperator.NOT_EQUAL, ""));
+ List postalAddresses = EntityUtil.filterByCondition(partyContactDetails, EntityCondition.makeCondition(postalAddressConditions, EntityOperator.AND));
// Fedex requires USA or Canada addresses to have a state/province ID, so filter out the ones without
postalAddressConditions.clear();
- postalAddressConditions.add(new EntityExpr("countryGeoId", EntityOperator.IN, UtilMisc.toList("CAN", "USA")));
- postalAddressConditions.add(new EntityExpr("stateProvinceGeoId", EntityOperator.EQUALS, null));
- postalAddresses = EntityUtil.filterOutByCondition(postalAddresses, new EntityConditionList(postalAddressConditions, EntityOperator.AND));
+ postalAddressConditions.add(EntityCondition.makeCondition("countryGeoId", EntityOperator.IN, UtilMisc.toList("CAN", "USA")));
+ postalAddressConditions.add(EntityCondition.makeCondition("stateProvinceGeoId", EntityOperator.EQUALS, null));
+ postalAddresses = EntityUtil.filterOutByCondition(postalAddresses, EntityCondition.makeCondition(postalAddressConditions, EntityOperator.AND));
postalAddressConditions.clear();
- postalAddressConditions.add(new EntityExpr("countryGeoId", EntityOperator.IN, UtilMisc.toList("CAN", "USA")));
- postalAddressConditions.add(new EntityExpr("stateProvinceGeoId", EntityOperator.EQUALS, ""));
- postalAddresses = EntityUtil.filterOutByCondition(postalAddresses, new EntityConditionList(postalAddressConditions, EntityOperator.AND));
+ postalAddressConditions.add(EntityCondition.makeCondition("countryGeoId", EntityOperator.IN, UtilMisc.toList("CAN", "USA")));
+ postalAddressConditions.add(EntityCondition.makeCondition("stateProvinceGeoId", EntityOperator.EQUALS, ""));
+ postalAddresses = EntityUtil.filterOutByCondition(postalAddresses, EntityCondition.makeCondition(postalAddressConditions, EntityOperator.AND));
postalAddress = EntityUtil.getFirst(postalAddresses);
if (UtilValidate.isEmpty(postalAddress)) {
@@ -215,13 +229,13 @@
// Get the first valid primary phone number (required by Fedex)
List phoneNumberConditions = new ArrayList();
- phoneNumberConditions.add(new EntityExpr("contactMechTypeId", EntityOperator.EQUALS, "TELECOM_NUMBER"));
- phoneNumberConditions.add(new EntityExpr("contactMechPurposeTypeId", EntityOperator.EQUALS, "PRIMARY_PHONE"));
- phoneNumberConditions.add(new EntityExpr("areaCode", EntityOperator.NOT_EQUAL, null));
- phoneNumberConditions.add(new EntityExpr("areaCode", EntityOperator.NOT_EQUAL, ""));
- phoneNumberConditions.add(new EntityExpr("contactNumber", EntityOperator.NOT_EQUAL, null));
- phoneNumberConditions.add(new EntityExpr("contactNumber", EntityOperator.NOT_EQUAL, ""));
- List phoneNumbers = EntityUtil.filterByCondition(partyContactDetails, new EntityConditionList(phoneNumberConditions, EntityOperator.AND));
+ phoneNumberConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "TELECOM_NUMBER"));
+ phoneNumberConditions.add(EntityCondition.makeCondition("contactMechPurposeTypeId", EntityOperator.EQUALS, "PRIMARY_PHONE"));
+ phoneNumberConditions.add(EntityCondition.makeCondition("areaCode", EntityOperator.NOT_EQUAL, null));
+ phoneNumberConditions.add(EntityCondition.makeCondition("areaCode", EntityOperator.NOT_EQUAL, ""));
+ phoneNumberConditions.add(EntityCondition.makeCondition("contactNumber", EntityOperator.NOT_EQUAL, null));
+ phoneNumberConditions.add(EntityCondition.makeCondition("contactNumber", EntityOperator.NOT_EQUAL, ""));
+ List phoneNumbers = EntityUtil.filterByCondition(partyContactDetails, EntityCondition.makeCondition(phoneNumberConditions, EntityOperator.AND));
GenericValue phoneNumberValue = EntityUtil.getFirst(phoneNumbers);
if (UtilValidate.isEmpty(phoneNumberValue)) {
String errorMessage = "Party with partyId " + companyPartyId + " does not have a current, fully populated primary phone number";
@@ -237,13 +251,13 @@
// Get the first valid fax number
List faxNumberConditions = new ArrayList();
- faxNumberConditions.add(new EntityExpr("contactMechTypeId", EntityOperator.EQUALS, "TELECOM_NUMBER"));
- faxNumberConditions.add(new EntityExpr("contactMechPurposeTypeId", EntityOperator.EQUALS, "FAX_NUMBER"));
- faxNumberConditions.add(new EntityExpr("areaCode", EntityOperator.NOT_EQUAL, null));
- faxNumberConditions.add(new EntityExpr("areaCode", EntityOperator.NOT_EQUAL, ""));
- faxNumberConditions.add(new EntityExpr("contactNumber", EntityOperator.NOT_EQUAL, null));
- faxNumberConditions.add(new EntityExpr("contactNumber", EntityOperator.NOT_EQUAL, ""));
- List faxNumbers = EntityUtil.filterByCondition(partyContactDetails, new EntityConditionList(faxNumberConditions, EntityOperator.AND));
+ faxNumberConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "TELECOM_NUMBER"));
+ faxNumberConditions.add(EntityCondition.makeCondition("contactMechPurposeTypeId", EntityOperator.EQUALS, "FAX_NUMBER"));
+ faxNumberConditions.add(EntityCondition.makeCondition("areaCode", EntityOperator.NOT_EQUAL, null));
+ faxNumberConditions.add(EntityCondition.makeCondition("areaCode", EntityOperator.NOT_EQUAL, ""));
+ faxNumberConditions.add(EntityCondition.makeCondition("contactNumber", EntityOperator.NOT_EQUAL, null));
+ faxNumberConditions.add(EntityCondition.makeCondition("contactNumber", EntityOperator.NOT_EQUAL, ""));
+ List faxNumbers = EntityUtil.filterByCondition(partyContactDetails, EntityCondition.makeCondition(faxNumberConditions, EntityOperator.AND));
GenericValue faxNumberValue = EntityUtil.getFirst(faxNumbers);
if(! UtilValidate.isEmpty(faxNumberValue)) {
faxNumber = faxNumberValue.getString("areaCode") + faxNumberValue.getString("contactNumber");
@@ -256,10 +270,10 @@
// Get the first valid email address
List emailConditions = new ArrayList();
- emailConditions.add(new EntityExpr("contactMechTypeId", EntityOperator.EQUALS, "EMAIL_ADDRESS"));
- emailConditions.add(new EntityExpr("infoString", EntityOperator.NOT_EQUAL, null));
- emailConditions.add(new EntityExpr("infoString", EntityOperator.NOT_EQUAL, ""));
- List emailAddresses = EntityUtil.filterByCondition(partyContactDetails, new EntityConditionList(emailConditions, EntityOperator.AND));
+ emailConditions.add(EntityCondition.makeCondition("contactMechTypeId", EntityOperator.EQUALS, "EMAIL_ADDRESS"));
+ emailConditions.add(EntityCondition.makeCondition("infoString", EntityOperator.NOT_EQUAL, null));
+ emailConditions.add(EntityCondition.makeCondition("infoString", EntityOperator.NOT_EQUAL, ""));
+ List emailAddresses = EntityUtil.filterByCondition(partyContactDetails, EntityCondition.makeCondition(emailConditions, EntityOperator.AND));
GenericValue emailAddressValue = EntityUtil.getFirst(emailAddresses);
if(! UtilValidate.isEmpty(emailAddressValue)) {
emailAddress = emailAddressValue.getString("infoString");
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Wed May 28 00:22:59 2008
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -15,27 +15,47 @@
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *******************************************************************************/
+ */
package org.ofbiz.shipment.thirdparty.ups;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.util.*;
import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
import javax.xml.parsers.ParserConfigurationException;
-import org.ofbiz.base.util.*;
+import org.ofbiz.base.util.Base64;
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.HttpClient;
+import org.ofbiz.base.util.HttpClientException;
+import org.ofbiz.base.util.StringUtil;
+import org.ofbiz.base.util.UtilMisc;
+import org.ofbiz.base.util.UtilNumber;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.base.util.UtilXml;
import org.ofbiz.entity.GenericDelegator;
import org.ofbiz.entity.GenericEntityException;
import org.ofbiz.entity.GenericValue;
-import org.ofbiz.entity.condition.EntityExpr;
+import org.ofbiz.entity.condition.EntityCondition;
import org.ofbiz.entity.condition.EntityOperator;
import org.ofbiz.entity.util.EntityUtil;
-import org.ofbiz.service.*;
import org.ofbiz.product.store.ProductStoreWorker;
-
+import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.GenericServiceException;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
@@ -195,7 +215,7 @@
if (allowCOD) {
// Get the paymentMethodTypeIds of all the orderPaymentPreferences involved with the shipment
- List opps = delegator.findList("OrderPaymentPreference", new EntityExpr("orderId", EntityOperator.IN, orderIdSet), null, null, null, false);
+ List opps = delegator.findList("OrderPaymentPreference", EntityCondition.makeCondition("orderId", EntityOperator.IN, orderIdSet), null, null, null, false);
List paymentMethodTypeIds = EntityUtil.getFieldListFromEntityList(opps, "paymentMethodTypeId", true);
if (paymentMethodTypeIds.size() > 1 || ! paymentMethodTypeIds.contains("EXT_COD")) {
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.bsh Wed May 28 00:22:59 2008
@@ -60,7 +60,7 @@
context.put("productFeatureApplTypes", productFeatureApplTypes);
}
-productFeaturesSize = delegator.findCountByCondition("ProductFeature", new EntityExpr("productFeatureCategoryId", EntityOperator.EQUALS, productFeatureCategoryId), null, null);
+productFeaturesSize = delegator.findCountByCondition("ProductFeature", EntityCondition.makeCondition("productFeatureCategoryId", EntityOperator.EQUALS, productFeatureCategoryId), null, null);
int highIndex = 0;
int lowIndex = 0;
@@ -82,7 +82,7 @@
context.put("lowIndex", lowIndex);
context.put("highIndex", highIndex);
-whereCondition = new EntityFieldMap(UtilMisc.toMap("productFeatureCategoryId", productFeatureCategoryId), EntityOperator.AND);
+whereCondition = EntityCondition.makeCondition(UtilMisc.toMap("productFeatureCategoryId", productFeatureCategoryId), EntityOperator.AND);
EntityFindOptions efo = new EntityFindOptions();
efo.setDistinct(true);
efo.setResultSetType(EntityFindOptions.TYPE_SCROLL_INSENSITIVE);
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/find/keywordsearch.bsh Wed May 28 00:22:59 2008
@@ -34,9 +34,9 @@
applicationTypes = delegator.findList("ProductFeatureApplType", null, null, UtilMisc.toList("description"), null, false);
//productCategories = delegator.findList("ProductCategory", null, null, UtilMisc.toList("description"), null, false);
-expr = new EntityExpr(new EntityExpr("showInSelect", EntityOperator.EQUALS, null),
+expr = EntityCondition.makeCondition(EntityCondition.makeCondition("showInSelect", EntityOperator.EQUALS, null),
EntityOperator.OR,
- new EntityExpr("showInSelect", EntityOperator.NOT_EQUAL, "N"));
+ EntityCondition.makeCondition("showInSelect", EntityOperator.NOT_EQUAL, "N"));
productCategories = delegator.findList("ProductCategory", expr, null, UtilMisc.toList("description"), null, false);
context.put("applicationTypes", applicationTypes);
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=660843&r1=660842&r2=660843&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 Wed May 28 00:22:59 2008
@@ -33,27 +33,27 @@
// get the 'to' this facility transfers
List exprsTo = null;
if (activeOnly) {
- exprsTo = UtilMisc.toList(new EntityExpr("facilityIdTo", EntityOperator.EQUALS, facilityId), new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "IXF_COMPLETE"), new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "IXF_CANCELLED"));
+ exprsTo = UtilMisc.toList(EntityCondition.makeCondition("facilityIdTo", EntityOperator.EQUALS, facilityId), EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_COMPLETE"), EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_CANCELLED"));
} else {
- exprsTo = UtilMisc.toList(new EntityExpr("facilityIdTo", EntityOperator.EQUALS, facilityId));
+ exprsTo = UtilMisc.toList(EntityCondition.makeCondition("facilityIdTo", EntityOperator.EQUALS, facilityId));
}
if (completeRequested) {
- exprsTo = UtilMisc.toList(new EntityExpr("facilityIdTo", EntityOperator.EQUALS, facilityId), new EntityExpr("statusId", EntityOperator.EQUALS, "IXF_REQUESTED"));
+ exprsTo = UtilMisc.toList(EntityCondition.makeCondition("facilityIdTo", EntityOperator.EQUALS, facilityId), EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "IXF_REQUESTED"));
}
-EntityConditionList ecl = new EntityConditionList(exprsTo, EntityOperator.AND);
+EntityConditionList ecl = EntityCondition.makeCondition(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
List exprsFrom = null;
if (activeOnly) {
- exprsFrom = UtilMisc.toList(new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId), new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "IXF_COMPLETE"), new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "IXF_CANCELLED"));
+ exprsFrom = UtilMisc.toList(EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId), EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_COMPLETE"), EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "IXF_CANCELLED"));
} else {
- exprsFrom = UtilMisc.toList(new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId));
+ exprsFrom = UtilMisc.toList(EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId));
}
if (completeRequested) {
- exprsFrom = UtilMisc.toList(new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId), new EntityExpr("statusId", EntityOperator.EQUALS, "IXF_REQUESTED"));
+ exprsFrom = UtilMisc.toList(EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId), EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "IXF_REQUESTED"));
}
-ecl = new EntityConditionList(exprsFrom, EntityOperator.AND);
+ecl = EntityCondition.makeCondition(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/facility/ViewFacilityInventoryByProduct.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/ViewFacilityInventoryByProduct.bsh Wed May 28 00:22:59 2008
@@ -99,17 +99,17 @@
// set distinct on so we only get one row per product
EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
- EntityCondition searchCondition = new EntityFieldMap(conditionMap, EntityOperator.AND);
- EntityCondition notVirtualCondition = new EntityExpr(new EntityExpr("isVirtual", EntityOperator.EQUALS, null),
+ EntityCondition searchCondition = EntityCondition.makeCondition(conditionMap, EntityOperator.AND);
+ EntityCondition notVirtualCondition = EntityCondition.makeCondition(EntityCondition.makeCondition("isVirtual", EntityOperator.EQUALS, null),
EntityOperator.OR,
- new EntityExpr("isVirtual", EntityOperator.NOT_EQUAL, "Y"));
+ EntityCondition.makeCondition("isVirtual", EntityOperator.NOT_EQUAL, "Y"));
whereConditionsList = UtilMisc.toList(searchCondition, notVirtualCondition);
// add the discontinuation date condition
if (UtilValidate.isNotEmpty(productsSoldThruTimestamp)) {
- EntityCondition discontinuationDateCondition = new EntityConditionList(UtilMisc.toList(
- new EntityExpr("salesDiscontinuationDate", EntityOperator.EQUALS, null),
- new EntityExpr("salesDiscontinuationDate", EntityOperator.GREATER_THAN, productsSoldThruTimestamp)),
+ EntityCondition discontinuationDateCondition = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("salesDiscontinuationDate", EntityOperator.EQUALS, null),
+ EntityCondition.makeCondition("salesDiscontinuationDate", EntityOperator.GREATER_THAN, productsSoldThruTimestamp)),
EntityOperator.OR);
whereConditionsList.add(discontinuationDateCondition);
searchParameterString = searchParameterString + "&productsSoldThruTimestamp=" + productsSoldThruTimestamp;
@@ -117,16 +117,16 @@
// add search on internal name
if (UtilValidate.isNotEmpty(internalName)) {
- whereConditionsList.add(new EntityExpr("internalName", true, EntityOperator.LIKE, "%" + internalName + "%", true));
+ whereConditionsList.add(EntityCondition.makeCondition("internalName", true, EntityOperator.LIKE, "%" + internalName + "%", true));
searchParameterString = searchParameterString + "&internalName=" + internalName;
}
// add search on productId
if (UtilValidate.isNotEmpty(productId)) {
- whereConditionsList.add(new EntityExpr("productId", true, EntityOperator.LIKE, productId + "%", true));
+ whereConditionsList.add(EntityCondition.makeCondition("productId", true, EntityOperator.LIKE, productId + "%", true));
searchParameterString = searchParameterString + "&productId=" + productId;
}
- EntityCondition whereCondition = new EntityConditionList(whereConditionsList, EntityOperator.AND);
+ EntityCondition whereCondition = EntityCondition.makeCondition(whereConditionsList, EntityOperator.AND);
boolean beganTransaction = false;
List prods = null;
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/countFacilityInventoryByProduct.bsh Wed May 28 00:22:59 2008
@@ -136,17 +136,17 @@
// set distinct on so we only get one row per product
EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
- EntityCondition searchCondition = new EntityFieldMap(conditionMap, EntityOperator.AND);
- EntityCondition notVirtualCondition = new EntityExpr(new EntityExpr("isVirtual", EntityOperator.EQUALS, null),
+ EntityCondition searchCondition = EntityCondition.makeCondition(conditionMap, EntityOperator.AND);
+ EntityCondition notVirtualCondition = EntityCondition.makeCondition(EntityCondition.makeCondition("isVirtual", EntityOperator.EQUALS, null),
EntityOperator.OR,
- new EntityExpr("isVirtual", EntityOperator.NOT_EQUAL, "Y"));
+ EntityCondition.makeCondition("isVirtual", EntityOperator.NOT_EQUAL, "Y"));
whereConditionsList = UtilMisc.toList(searchCondition, notVirtualCondition);
// add the discontinuation date condition
if (UtilValidate.isNotEmpty(productsSoldThruTimestamp)) {
- EntityCondition discontinuationDateCondition = new EntityConditionList(UtilMisc.toList(
- new EntityExpr("salesDiscontinuationDate", EntityOperator.EQUALS, null),
- new EntityExpr("salesDiscontinuationDate", EntityOperator.GREATER_THAN, productsSoldThruTimestamp)),
+ EntityCondition discontinuationDateCondition = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("salesDiscontinuationDate", EntityOperator.EQUALS, null),
+ EntityCondition.makeCondition("salesDiscontinuationDate", EntityOperator.GREATER_THAN, productsSoldThruTimestamp)),
EntityOperator.OR);
whereConditionsList.add(discontinuationDateCondition);
searchParameterString = searchParameterString + "&productsSoldThruTimestamp=" + productsSoldThruTimestamp;
@@ -154,13 +154,13 @@
// add search on internal name
if (UtilValidate.isNotEmpty(internalName)) {
- whereConditionsList.add(new EntityExpr("internalName", true, EntityOperator.LIKE, "%" + internalName + "%", true));
+ whereConditionsList.add(EntityCondition.makeCondition("internalName", true, EntityOperator.LIKE, "%" + internalName + "%", true));
searchParameterString = searchParameterString + "&internalName=" + internalName;
}
// add search on productId
if (UtilValidate.isNotEmpty(productId)) {
- whereConditionsList.add(new EntityExpr("productId", true, EntityOperator.LIKE, productId + "%", true));
+ whereConditionsList.add(EntityCondition.makeCondition("productId", true, EntityOperator.LIKE, productId + "%", true));
searchParameterString = searchParameterString + "&productId=" + productId;
}
@@ -222,7 +222,7 @@
}
- EntityCondition whereCondition = new EntityConditionList(whereConditionsList, EntityOperator.AND);
+ EntityCondition whereCondition = EntityCondition.makeCondition(whereConditionsList, EntityOperator.AND);
boolean beganTransaction = false;
List prods = null;
@@ -269,13 +269,13 @@
// Make a query against the sales usage view entity
salesUsageIt = delegator.findListIteratorByCondition(salesUsageViewEntity,
- new EntityConditionList(
+ EntityCondition.makeCondition(
UtilMisc.toList(
- new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId),
- new EntityExpr("productId", EntityOperator.EQUALS, oneProd.getString("productId")),
- new EntityExpr("statusId", EntityOperator.IN, UtilMisc.toList("ORDER_COMPLETED", "ORDER_APPROVED", "ORDER_HELD")),
- new EntityExpr("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"),
- new EntityExpr("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime)
+ EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId),
+ EntityCondition.makeCondition("productId", EntityOperator.EQUALS, oneProd.getString("productId")),
+ EntityCondition.makeCondition("statusId", EntityOperator.IN, UtilMisc.toList("ORDER_COMPLETED", "ORDER_APPROVED", "ORDER_HELD")),
+ EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "SALES_ORDER"),
+ EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime)
),
EntityOperator.AND),
null, null, null, null);
@@ -295,12 +295,12 @@
// Make a query against the production usage view entity
productionUsageIt = delegator.findListIteratorByCondition(productionUsageViewEntity,
- new EntityConditionList(
+ EntityCondition.makeCondition(
UtilMisc.toList(
- new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId),
- new EntityExpr("productId", EntityOperator.EQUALS, oneProd.getString("productId")),
- new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "PROD_ORDER_TASK"),
- new EntityExpr("actualCompletionDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime)
+ EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId),
+ EntityCondition.makeCondition("productId", EntityOperator.EQUALS, oneProd.getString("productId")),
+ EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "PROD_ORDER_TASK"),
+ EntityCondition.makeCondition("actualCompletionDate", EntityOperator.GREATER_THAN_EQUAL_TO, checkTime)
),
EntityOperator.AND),
null, null, null, null);
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/findInventoryItemsByLabels.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/findInventoryItemsByLabels.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/findInventoryItemsByLabels.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/findInventoryItemsByLabels.bsh Wed May 28 00:22:59 2008
@@ -49,12 +49,12 @@
inventoryItemAndLabelsView.addViewLink("II", "IL" + i, new Boolean(false), ModelKeyMap.makeKeyMapList("inventoryItemId"));
}
}
-List andCondition = UtilMisc.toList(new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId));
+List andCondition = UtilMisc.toList(EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId));
for (int i = 1; i <= numberOfFields; i++) {
String inventoryItemLabelId = parameters.get("inventoryItemLabelId_" + i);
if (UtilValidate.isNotEmpty(inventoryItemLabelId)) {
inventoryItemAndLabelsView.addAlias("IL" + i, "inventoryItemLabelId" + i, "inventoryItemLabelId", null, null, null, null);
- andCondition.add(new EntityExpr("inventoryItemLabelId" + i, EntityOperator.EQUALS, inventoryItemLabelId));
+ andCondition.add(EntityCondition.makeCondition("inventoryItemLabelId" + i, EntityOperator.EQUALS, inventoryItemLabelId));
}
}
EntityListIterator inventoryItemsEli = null;
@@ -64,7 +64,7 @@
try {
EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
beganTransaction = TransactionUtil.begin();
- inventoryItemsEli = delegator.find(inventoryItemAndLabelsView, new EntityConditionList(andCondition, EntityOperator.AND), null, null, null, findOpts);
+ inventoryItemsEli = delegator.find(inventoryItemAndLabelsView, EntityCondition.makeCondition(andCondition, EntityOperator.AND), null, null, null, findOpts);
// get the indexes for the partial list
lowIndex = ((viewIndex * viewSize) + 1);
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=660843&r1=660842&r2=660843&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 Wed May 28 00:22:59 2008
@@ -33,18 +33,18 @@
// build conditions
conditions = UtilMisc.toList(
- new EntityExpr("facilityId", EntityOperator.EQUALS, facilityId),
- new EntityExpr("inventoryItemTypeId", EntityOperator.EQUALS, "NON_SERIAL_INV_ITEM")
+ EntityCondition.makeCondition("facilityId", EntityOperator.EQUALS, facilityId),
+ EntityCondition.makeCondition("inventoryItemTypeId", EntityOperator.EQUALS, "NON_SERIAL_INV_ITEM")
);
if (productId != null && productId.trim().length() != 0) {
- conditions.add( new EntityExpr("productId", EntityOperator.LIKE, productId.trim() + "%") );
+ conditions.add( EntityCondition.makeCondition("productId", EntityOperator.LIKE, productId.trim() + "%") );
}
if (internalName != null && internalName.trim().length() != 0) {
- conditions.add( new EntityExpr("internalName", true, EntityOperator.LIKE, internalName.trim() + "%", true) );
+ conditions.add( EntityCondition.makeCondition("internalName", true, EntityOperator.LIKE, internalName.trim() + "%", true) );
}
if (conditions.size() > 2) {
- EntityConditionList ecl = new EntityConditionList(conditions, EntityOperator.AND);
+ EntityConditionList ecl = EntityCondition.makeCondition(conditions, EntityOperator.AND);
physicalInventory = delegator.findList("ProductInventoryItem", ecl, null, UtilMisc.toList("productId"), null, false);
// also need the overal product QOH and ATP for each product
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/InventoryItemTotals.bsh Wed May 28 00:22:59 2008
@@ -38,9 +38,9 @@
totalRetailPriceGrandTotal = 0.0;
boolean beganTransaction = false;
if (action != null) {
- conditions = UtilMisc.toList(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "INV_DELIVERED"));
- conditions.add(new EntityExpr("statusId", EntityOperator.EQUALS, null));
- conditionList = new EntityConditionList(conditions, EntityOperator.OR);
+ conditions = UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "INV_DELIVERED"));
+ conditions.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, null));
+ conditionList = EntityCondition.makeCondition(conditions, EntityOperator.OR);
try {
// create resultMap to stop issue with the first puts in the while loop
resultMap = new HashMap();
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/receiveInventory.bsh Wed May 28 00:22:59 2008
@@ -94,7 +94,7 @@
exprs = new ArrayList();
while (issueIter.hasNext()) {
issuance = issueIter.next();
- exprs.add(new EntityExpr("orderItemSeqId", EntityOperator.EQUALS, issuance.getString("orderItemSeqId")));
+ exprs.add(EntityCondition.makeCondition("orderItemSeqId", EntityOperator.EQUALS, issuance.getString("orderItemSeqId")));
double issuanceQty = issuance.getDouble("quantity").doubleValue();
if (shippedQuantities.containsKey(issuance.getString("orderItemSeqId"))) {
issuanceQty += ((Double)shippedQuantities.get(issuance.getString("orderItemSeqId"))).doubleValue();
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.bsh Wed May 28 00:22:59 2008
@@ -57,7 +57,7 @@
if (UtilValidate.isNotEmpty(shipmentTypeId)) {
paramListBuffer.append("&shipmentTypeId=");
paramListBuffer.append(shipmentTypeId);
- findShipmentExprs.add(new EntityExpr("shipmentTypeId", EntityOperator.EQUALS, shipmentTypeId));
+ findShipmentExprs.add(EntityCondition.makeCondition("shipmentTypeId", EntityOperator.EQUALS, shipmentTypeId));
currentShipmentType = delegator.findByPrimaryKeyCache("ShipmentType", UtilMisc.toMap("shipmentTypeId", shipmentTypeId));
context.put("currentShipmentType", currentShipmentType);
@@ -65,7 +65,7 @@
if (UtilValidate.isNotEmpty(originFacilityId)) {
paramListBuffer.append("&originFacilityId=");
paramListBuffer.append(originFacilityId);
- findShipmentExprs.add(new EntityExpr("originFacilityId", EntityOperator.EQUALS, originFacilityId));
+ findShipmentExprs.add(EntityCondition.makeCondition("originFacilityId", EntityOperator.EQUALS, originFacilityId));
currentOriginFacility = delegator.findByPrimaryKeyCache("Facility", UtilMisc.toMap("facilityId", originFacilityId));
context.put("currentOriginFacility", currentOriginFacility);
@@ -73,7 +73,7 @@
if (UtilValidate.isNotEmpty(destinationFacilityId)) {
paramListBuffer.append("&destinationFacilityId=");
paramListBuffer.append(destinationFacilityId);
- findShipmentExprs.add(new EntityExpr("destinationFacilityId", EntityOperator.EQUALS, destinationFacilityId));
+ findShipmentExprs.add(EntityCondition.makeCondition("destinationFacilityId", EntityOperator.EQUALS, destinationFacilityId));
currentDestinationFacility = delegator.findByPrimaryKeyCache("Facility", UtilMisc.toMap("facilityId", destinationFacilityId));
context.put("currentDestinationFacility", currentDestinationFacility);
@@ -81,7 +81,7 @@
if (UtilValidate.isNotEmpty(statusId)) {
paramListBuffer.append("&statusId=");
paramListBuffer.append(statusId);
- findShipmentExprs.add(new EntityExpr("statusId", EntityOperator.EQUALS, statusId));
+ findShipmentExprs.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, statusId));
currentStatus = delegator.findByPrimaryKeyCache("StatusItem", UtilMisc.toMap("statusId", statusId));
context.put("currentStatus", currentStatus);
@@ -91,14 +91,14 @@
if (minDate.length() < 14) minDate = minDate + " " + "00:00:00.000";
paramListBuffer.append("&minDate=");
paramListBuffer.append(minDate);
- findShipmentExprs.add(new EntityExpr("estimatedShipDate", EntityOperator.GREATER_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(minDate, "Timestamp", null, null)));
+ findShipmentExprs.add(EntityCondition.makeCondition("estimatedShipDate", 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";
paramListBuffer.append("&maxDate=");
paramListBuffer.append(maxDate);
- findShipmentExprs.add(new EntityExpr("estimatedShipDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(maxDate, "Timestamp", null, null)));
+ findShipmentExprs.add(EntityCondition.makeCondition("estimatedShipDate", EntityOperator.LESS_THAN_EQUAL_TO, ObjectType.simpleTypeConvert(maxDate, "Timestamp", null, null)));
}
if ("Y".equals(lookupFlag)) {
@@ -106,7 +106,7 @@
if (findShipmentExprs.size() > 0) {
EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
- mainCond = new EntityConditionList(findShipmentExprs, EntityOperator.AND);
+ mainCond = EntityCondition.makeCondition(findShipmentExprs, EntityOperator.AND);
List orderBy = UtilMisc.toList("-estimatedShipDate");
boolean beganTransaction = false;
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackingSlip.bsh Wed May 28 00:22:59 2008
@@ -50,11 +50,11 @@
// Add in the total of all previously shipped items
previousShipmentIter = delegator.find("Shipment",
- new EntityConditionList(
+ EntityCondition.makeCondition(
UtilMisc.toList(
- new EntityExpr("primaryOrderId", EntityOperator.EQUALS, shipment.getString("primaryOrderId")),
- new EntityExpr("shipmentTypeId", EntityOperator.EQUALS, "SALES_SHIPMENT"),
- new EntityExpr("createdDate", EntityOperator.LESS_THAN_EQUAL_TO, shipment.getString("createdDate"))
+ EntityCondition.makeCondition("primaryOrderId", EntityOperator.EQUALS, shipment.getString("primaryOrderId")),
+ EntityCondition.makeCondition("shipmentTypeId", EntityOperator.EQUALS, "SALES_SHIPMENT"),
+ EntityCondition.makeCondition("createdDate", EntityOperator.LESS_THAN_EQUAL_TO, shipment.getString("createdDate"))
),
EntityOperator.AND),
null, null, null, null);
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.bsh (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/ReceiveInventoryAgainstPurchaseOrder.bsh Wed May 28 00:22:59 2008
@@ -173,8 +173,8 @@
// Retrieve the backordered quantity
// TODO: limit to a facility? The shipment destination facility is not necessarily the same facility as the inventory
- conditions = UtilMisc.toList(new EntityExpr("productId", EntityOperator.EQUALS, product.get("productId")), new EntityExpr("availableToPromiseTotal", EntityOperator.LESS_THAN, new Double(0)));
- negativeInventoryItems = delegator.findList("InventoryItem", new EntityConditionList(conditions, EntityOperator.AND), null, null, null, false);
+ conditions = UtilMisc.toList(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, product.get("productId")), EntityCondition.makeCondition("availableToPromiseTotal", EntityOperator.LESS_THAN, new Double(0)));
+ negativeInventoryItems = delegator.findList("InventoryItem", EntityCondition.makeCondition(conditions, EntityOperator.AND), null, null, null, false);
backOrderedQuantity = 0;
niit = negativeInventoryItems.iterator();
while (niit.hasNext()) {
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/project/ProjectWorker.java Wed May 28 00:22:59 2008
@@ -50,13 +50,13 @@
if (userLogin != null && userLogin.get("partyId") != null) {
try {
- EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(UtilMisc.toList(
- new EntityExpr("partyId", EntityOperator.EQUALS, userLogin.get("partyId")),
- new EntityExpr("currentStatusId", EntityOperator.NOT_EQUAL, "WF_COMPLETED"),
- new EntityExpr("currentStatusId", EntityOperator.NOT_EQUAL, "WF_TERMINATED"),
- new EntityExpr("currentStatusId", EntityOperator.NOT_EQUAL, "WF_ABORTED"),
- new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "TASK"),
- new EntityExpr("workEffortPurposeTypeId", EntityOperator.EQUALS, "WEPT_PROJECT")),
+ EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, userLogin.get("partyId")),
+ EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "WF_COMPLETED"),
+ EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "WF_TERMINATED"),
+ EntityCondition.makeCondition("currentStatusId", EntityOperator.NOT_EQUAL, "WF_ABORTED"),
+ EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "TASK"),
+ EntityCondition.makeCondition("workEffortPurposeTypeId", EntityOperator.EQUALS, "WEPT_PROJECT")),
EntityOperator.AND);
validWorkEfforts = delegator.findList("WorkEffortAndPartyAssign", ecl, null, UtilMisc.toList("priority"), null, false);
} catch (GenericEntityException e) {
@@ -77,10 +77,10 @@
if (userLogin != null && userLogin.get("partyId") != null) {
try {
- EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(UtilMisc.toList(
- new EntityExpr("partyId", EntityOperator.EQUALS, userLogin.get("partyId")),
- new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "TASK"),
- new EntityExpr("workEffortPurposeTypeId", EntityOperator.EQUALS, "WEPT_PROJECT")),
+ EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, userLogin.get("partyId")),
+ EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "TASK"),
+ EntityCondition.makeCondition("workEffortPurposeTypeId", EntityOperator.EQUALS, "WEPT_PROJECT")),
EntityOperator.AND);
validWorkEfforts = delegator.findList("WorkEffortAndPartyAssign", ecl, null, UtilMisc.toList("priority"), null, false);
} catch (GenericEntityException e) {
@@ -107,9 +107,9 @@
if (userLogin != null && userLogin.get("partyId") != null) {
try {
- EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(UtilMisc.toList(
- new EntityExpr("workEffortIdFrom", EntityOperator.EQUALS, projectWorkEffortId),
- new EntityExpr("workEffortAssocTypeId", EntityOperator.EQUALS, "WORK_EFF_BREAKDOWN")),
+ EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("workEffortIdFrom", EntityOperator.EQUALS, projectWorkEffortId),
+ EntityCondition.makeCondition("workEffortAssocTypeId", EntityOperator.EQUALS, "WORK_EFF_BREAKDOWN")),
EntityOperator.AND);
relatedWorkEfforts = delegator.findList("WorkEffortAssoc", ecl, null, null, null, false);
} catch (GenericEntityException e) {
@@ -157,9 +157,9 @@
if (userLogin != null && userLogin.get("partyId") != null) {
try {
- EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(UtilMisc.toList(
- new EntityExpr("workEffortIdFrom", EntityOperator.EQUALS, phaseWorkEffortId),
- new EntityExpr("workEffortAssocTypeId", EntityOperator.EQUALS, "WORK_EFF_BREAKDOWN")),
+ EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("workEffortIdFrom", EntityOperator.EQUALS, phaseWorkEffortId),
+ EntityCondition.makeCondition("workEffortAssocTypeId", EntityOperator.EQUALS, "WORK_EFF_BREAKDOWN")),
EntityOperator.AND);
relatedWorkEfforts = delegator.findList("WorkEffortAssoc", ecl, null, null, null, false);
} catch (GenericEntityException e) {
@@ -206,7 +206,7 @@
if (userLogin != null && userLogin.get("partyId") != null) {
try {
- EntityExpr ee = new EntityExpr("workEffortId", EntityOperator.EQUALS, workEffortId);
+ EntityExpr ee = EntityCondition.makeCondition("workEffortId", EntityOperator.EQUALS, workEffortId);
notes = delegator.findList("WorkEffortNoteAndData", ee, null, UtilMisc.toList("noteDateTime"), null, false);
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java Wed May 28 00:22:59 2008
@@ -123,7 +123,7 @@
}
// Find WorkEffort where current workEffortId = workEffortParentId; only select minimal fields to keep the size low
- List childWorkEffortList = delegator.findList("WorkEffort", new EntityExpr("workEffortParentId", EntityComparisonOperator.EQUALS, workEffortId),
+ List childWorkEffortList = delegator.findList("WorkEffort", EntityCondition.makeCondition("workEffortParentId", EntityComparisonOperator.EQUALS, workEffortId),
UtilMisc.toSet("workEffortId", "workEffortParentId"), null, null, true);
Iterator childWorkEffortIter = childWorkEffortList.iterator();
while (childWorkEffortIter.hasNext()) {
@@ -268,7 +268,7 @@
dynamicViewEntity.addMemberEntity(entityAlias, "WorkEffortKeyword");
dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null);
dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId"));
- entityConditionList.add(new EntityExpr(prefix + "Keyword", EntityOperator.LIKE, keyword));
+ entityConditionList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword));
//don't add an alias for this, will be part of a complex alias: dynamicViewEntity.addAlias(entityAlias, prefix + "RelevancyWeight", "relevancyWeight", null, null, null, null);
relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight", null, null));
@@ -296,9 +296,9 @@
Iterator keywordIter = keywordFixedOrSet.iterator();
while (keywordIter.hasNext()) {
String keyword = (String) keywordIter.next();
- keywordOrList.add(new EntityExpr(prefix + "Keyword", EntityOperator.LIKE, keyword));
+ keywordOrList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword));
}
- entityConditionList.add(new EntityConditionList(keywordOrList, EntityOperator.OR));
+ entityConditionList.add(EntityCondition.makeCondition(keywordOrList, EntityOperator.OR));
workEffortIdGroupBy = true;
@@ -323,7 +323,7 @@
resultSortOrder.setSortOrder(this);
}
dynamicViewEntity.addAlias("WEFF", "workEffortId", null, null, null, new Boolean(workEffortIdGroupBy), null);
- EntityCondition whereCondition = new EntityConditionList(entityConditionList, EntityOperator.AND);
+ EntityCondition whereCondition = EntityCondition.makeCondition(entityConditionList, EntityOperator.AND);
// Debug.logInfo("WorkEffortSearch, whereCondition = " + whereCondition.toString(), module);
@@ -554,12 +554,12 @@
workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("workEffortId","workEffortIdFrom"));
List assocConditionFromTo = FastList.newInstance();
- assocConditionFromTo.add(new EntityExpr(prefix + "WorkEffortIdTo", EntityOperator.IN, workEffortIdSet));
+ assocConditionFromTo.add(EntityCondition.makeCondition(prefix + "WorkEffortIdTo", EntityOperator.IN, workEffortIdSet));
if (UtilValidate.isNotEmpty(workEffortAssocTypeId)) {
- assocConditionFromTo.add(new EntityExpr(prefix + "WorkEffortAssocTypeId", EntityOperator.EQUALS, workEffortAssocTypeId));
+ assocConditionFromTo.add(EntityCondition.makeCondition(prefix + "WorkEffortAssocTypeId", EntityOperator.EQUALS, workEffortAssocTypeId));
}
- assocConditionFromTo.add(new EntityExpr(new EntityExpr(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));
- assocConditionFromTo.add(new EntityExpr(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp));
+ assocConditionFromTo.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));
+ assocConditionFromTo.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp));
// do workEffortId = workEffortIdTo, workEffortIdFrom IN workEffortIdSet
entityAlias = "WFA" + workEffortSearchContext.index;
@@ -575,15 +575,15 @@
workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.TRUE, ModelKeyMap.makeKeyMapList("workEffortId","workEffortIdTo"));
List assocConditionToFrom = FastList.newInstance();
- assocConditionToFrom.add(new EntityExpr(prefix + "WorkEffortIdFrom", EntityOperator.IN, workEffortIdSet));
+ assocConditionToFrom.add(EntityCondition.makeCondition(prefix + "WorkEffortIdFrom", EntityOperator.IN, workEffortIdSet));
if (UtilValidate.isNotEmpty(workEffortAssocTypeId)) {
- assocConditionToFrom.add(new EntityExpr(prefix + "WorkEffortAssocTypeId", EntityOperator.EQUALS, workEffortAssocTypeId));
+ assocConditionToFrom.add(EntityCondition.makeCondition(prefix + "WorkEffortAssocTypeId", EntityOperator.EQUALS, workEffortAssocTypeId));
}
- assocConditionToFrom.add(new EntityExpr(new EntityExpr(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));
- assocConditionToFrom.add(new EntityExpr(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp));
+ assocConditionToFrom.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));
+ assocConditionToFrom.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp));
// now create and add the combined constraint
- workEffortSearchContext.entityConditionList.add(new EntityExpr(new EntityConditionList(assocConditionFromTo, EntityOperator.AND), EntityOperator.OR, new EntityConditionList(assocConditionToFrom, EntityOperator.AND)));
+ workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(assocConditionFromTo, EntityOperator.AND), EntityOperator.OR, EntityCondition.makeCondition(assocConditionToFrom, EntityOperator.AND)));
// add in workEffortSearchConstraint, don't worry about the workEffortSearchResultId or constraintSeqId, those will be fill in later
@@ -675,7 +675,7 @@
workEffortSearchContext.dynamicViewEntity.addMemberEntity(entityAlias, "WorkEffortReview");
workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ReviewText", "reviewText", null, null, null, null);
workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId"));
- workEffortSearchContext.entityConditionList.add( new EntityExpr(new EntityFunction.UPPER(new EntityFieldValue(prefix + "ReviewText")), EntityOperator.LIKE ,new EntityFunction.UPPER(("%"+ reviewTextString) + "%")));
+ workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD(prefix + "ReviewText"), EntityOperator.LIKE, EntityFunction.UPPER("%" + reviewTextString + "%")));
Map valueMap = UtilMisc.toMap("constraintName", constraintName, "infoString", this.reviewTextString);
workEffortSearchContext.workEffortSearchConstraintList.add(workEffortSearchContext.getDelegator().makeValue("WorkEffortSearchConstraint", valueMap));
}
@@ -732,11 +732,11 @@
workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId"));
- workEffortSearchContext.entityConditionList.add(new EntityExpr(prefix + "PartyId", EntityOperator.EQUALS, partyId));
- workEffortSearchContext.entityConditionList.add(new EntityExpr(new EntityExpr(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));
- workEffortSearchContext.entityConditionList.add(new EntityExpr(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp));
+ workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "PartyId", EntityOperator.EQUALS, partyId));
+ workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));
+ workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp));
if (UtilValidate.isNotEmpty(this.roleTypeId)) {
- workEffortSearchContext.entityConditionList.add(new EntityExpr(prefix + "RoleTypeId", EntityOperator.EQUALS, roleTypeId));
+ workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "RoleTypeId", EntityOperator.EQUALS, roleTypeId));
}
// add in workEffortSearchConstraint, don't worry about the workEffortSearchResultId or constraintSeqId, those will be fill in later
@@ -836,9 +836,9 @@
workEffortSearchContext.dynamicViewEntity.addAlias(entityAlias, prefix + "ThruDate", "thruDate", null, null, null, null);
workEffortSearchContext.dynamicViewEntity.addViewLink("WEFF", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("workEffortId"));
- workEffortSearchContext.entityConditionList.add(new EntityExpr(prefix + "ProductId", EntityOperator.IN, productIdSet));
- workEffortSearchContext.entityConditionList.add(new EntityExpr(new EntityExpr(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, new EntityExpr(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));
- workEffortSearchContext.entityConditionList.add(new EntityExpr(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp));
+ workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "ProductId", EntityOperator.IN, productIdSet));
+ workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition(prefix + "ThruDate", EntityOperator.GREATER_THAN, workEffortSearchContext.nowTimestamp)));
+ workEffortSearchContext.entityConditionList.add(EntityCondition.makeCondition(prefix + "FromDate", EntityOperator.LESS_THAN, workEffortSearchContext.nowTimestamp));
// add in workEffortSearchConstraint, don't worry about the workEffortSearchResultId or constraintSeqId, those will be fill in later
StringBuffer productIdInfo = new StringBuffer();
@@ -1037,24 +1037,24 @@
EntityConditionList dateConditions = null;
EntityExpr dateCondition=null;
if(fromDate !=null && thruDate!=null) {
- dateConditions= new EntityConditionList(UtilMisc.toList(
- new EntityExpr("lastModifiedDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate),
- new EntityExpr("lastModifiedDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate)), EntityOperator.AND);
+ dateConditions= EntityCondition.makeCondition(UtilMisc.toList(
+ EntityCondition.makeCondition("lastModifiedDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate),
+ EntityCondition.makeCondition("lastModifiedDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate)), EntityOperator.AND);
} if(fromDate !=null) {
- dateCondition=new EntityExpr("lastModifiedDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate);
+ dateCondition=EntityCondition.makeCondition("lastModifiedDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate);
} else if (thruDate != null) {
- dateCondition = new EntityExpr("lastModifiedDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate);
+ dateCondition = EntityCondition.makeCondition("lastModifiedDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate);
}
EntityConditionList conditions = null;
if(fromDate !=null && thruDate!=null) {
- conditions=new EntityConditionList(UtilMisc.toList(
+ conditions=EntityCondition.makeCondition(UtilMisc.toList(
dateConditions,
- new EntityExpr("lastModifiedDate", EntityOperator.EQUALS, null)),
+ EntityCondition.makeCondition("lastModifiedDate", EntityOperator.EQUALS, null)),
EntityOperator.OR);
} else {
- conditions=new EntityConditionList(UtilMisc.toList(
+ conditions=EntityCondition.makeCondition(UtilMisc.toList(
dateCondition,
- new EntityExpr("lastModifiedDate", EntityOperator.EQUALS, null)),
+ EntityCondition.makeCondition("lastModifiedDate", EntityOperator.EQUALS, null)),
EntityOperator.OR);
}