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 [2/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/content/src/org/ofbiz/content/ContentManagementWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementWorker.java Wed May 28 00:22:59 2008
@@ -744,15 +744,15 @@
        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 conditionMain = null;
        if (condList.size() > 0 ) {
-           EntityCondition conditionType = new EntityConditionList(condList, EntityOperator.OR);
-           conditionMain = new EntityConditionList(UtilMisc.toList( new EntityExpr("contentIdTo", EntityOperator.EQUALS, contentId), conditionType), EntityOperator.AND);
+           EntityCondition conditionType = EntityCondition.makeCondition(condList, EntityOperator.OR);
+           conditionMain = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId), conditionType), EntityOperator.AND);
        } else {
-           conditionMain = new EntityExpr("contentIdTo", EntityOperator.EQUALS, contentId);
+           conditionMain = EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId);
        }
         List listAll = delegator.findList("ContentAssoc", conditionMain, null, null, null, true);
         List listFiltered = EntityUtil.filterByDate(listAll);
@@ -782,11 +782,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, contentId), conditionType), EntityOperator.AND);
+       EntityCondition conditionType = EntityCondition.makeCondition(condList, EntityOperator.OR);
+       EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList( EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentId), conditionType), EntityOperator.AND);
             List listAll = delegator.findList("ContentAssoc", conditionMain, null, null, null, true);
             List listFiltered = EntityUtil.filterByDate(listAll);
             Iterator iter = listFiltered.iterator();

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java Wed May 28 00:22:59 2008
@@ -19,25 +19,33 @@
 
 package org.ofbiz.content.blog;
 
-import org.ofbiz.service.DispatchContext;
-import org.ofbiz.service.ServiceUtil;
-import org.ofbiz.service.LocalDispatcher;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import javolution.util.FastList;
+
+import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.UtilMisc;
-import org.ofbiz.base.util.Debug;
+import org.ofbiz.content.content.ContentWorker;
 import org.ofbiz.entity.GenericDelegator;
-import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.GenericEntityException;
-import org.ofbiz.entity.condition.EntityExpr;
-import org.ofbiz.entity.condition.EntityOperator;
-import org.ofbiz.entity.condition.EntityConditionList;
-import org.ofbiz.content.content.ContentWorker;
-import com.sun.syndication.feed.synd.*;
-
-import java.util.*;
-import java.io.IOException;
+import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
+import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ServiceUtil;
 
-import javolution.util.FastList;
+import com.sun.syndication.feed.synd.SyndContent;
+import com.sun.syndication.feed.synd.SyndContentImpl;
+import com.sun.syndication.feed.synd.SyndEntry;
+import com.sun.syndication.feed.synd.SyndEntryImpl;
+import com.sun.syndication.feed.synd.SyndFeed;
+import com.sun.syndication.feed.synd.SyndFeedImpl;
 
 /**
  * BlogRssServices
@@ -91,13 +99,13 @@
     public static List generateEntryList(LocalDispatcher dispatcher, GenericDelegator delegator, String contentId, String entryLink, Locale locale, GenericValue userLogin) {
         List entries = FastList.newInstance();
         List exprs = FastList.newInstance();
-        exprs.add(new EntityExpr("contentIdStart", EntityOperator.EQUALS, contentId));
-        exprs.add(new EntityExpr("caContentAssocTypeId", EntityOperator.EQUALS, "PUBLISH_LINK"));
-        exprs.add(new EntityExpr("statusId", EntityOperator.EQUALS, "CTNT_PUBLISHED"));
+        exprs.add(EntityCondition.makeCondition("contentIdStart", contentId));
+        exprs.add(EntityCondition.makeCondition("caContentAssocTypeId", "PUBLISH_LINK"));
+        exprs.add(EntityCondition.makeCondition("statusId", "CTNT_PUBLISHED"));
 
         List contentRecs = null;
         try {
-            contentRecs = delegator.findList("ContentAssocViewTo", new EntityConditionList(exprs, EntityOperator.AND), null, UtilMisc.toList("-caFromDate"), null, false);
+            contentRecs = delegator.findList("ContentAssocViewTo", EntityCondition.makeCondition(exprs), null, UtilMisc.toList("-caFromDate"), null, false);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
         }

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java Wed May 28 00:22:59 2008
@@ -26,9 +26,11 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Set;
+
+import javolution.util.FastList;
 
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
@@ -39,8 +41,8 @@
 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.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
@@ -157,21 +159,21 @@
         
         try {   
             Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
-            List exprList = new ArrayList();
-            exprList.add(new EntityExpr("contentIdTo", EntityOperator.EQUALS, contentId));
-            exprList.add(new EntityExpr("rootRevisionContentId", EntityOperator.EQUALS, contentId));
+            List exprList = FastList.newInstance();
+            exprList.add(EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId));
+            exprList.add(EntityCondition.makeCondition("rootRevisionContentId", EntityOperator.EQUALS, contentId));
             if (UtilValidate.isNotEmpty(contentRevisionSeqId)) {
-                exprList.add(new EntityExpr("contentRevisionSeqId", EntityOperator.LESS_THAN_EQUAL_TO, contentRevisionSeqId));
+                exprList.add(EntityCondition.makeCondition("contentRevisionSeqId", EntityOperator.LESS_THAN_EQUAL_TO, contentRevisionSeqId));
             }
-            exprList.add(new EntityExpr("contentAssocTypeId", EntityOperator.EQUALS, "COMPDOC_PART"));
-            exprList.add(new EntityExpr("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp));
+            exprList.add(EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.EQUALS, "COMPDOC_PART"));
+            exprList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, nowTimestamp));
 
-            List thruList = new ArrayList();
-            thruList.add(new EntityExpr("thruDate", EntityOperator.EQUALS, null));
-            thruList.add(new EntityExpr("thruDate", EntityOperator.GREATER_THAN, nowTimestamp));
-            exprList.add(new EntityConditionList(thruList, EntityOperator.OR));
+            List thruList = FastList.newInstance();
+            thruList.add(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null));
+            thruList.add(EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, nowTimestamp));
+            exprList.add(EntityCondition.makeCondition(thruList, EntityOperator.OR));
 
-            EntityConditionList conditionList = new EntityConditionList(exprList, EntityOperator.AND);
+            EntityConditionList conditionList = EntityCondition.makeCondition(exprList, EntityOperator.AND);
             
             String [] fields = {"rootRevisionContentId", "itemContentId", "maxRevisionSeqId", "contentId", "dataResourceId", "contentIdTo", "contentAssocTypeId", "fromDate", "sequenceNum"};
             Set selectFields = UtilMisc.toSetArray(fields);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServices.java Wed May 28 00:22:59 2008
@@ -18,6 +18,20 @@
  *******************************************************************************/
 package org.ofbiz.content.content;
 
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+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 java.util.Set;
+
+import javolution.util.FastMap;
+
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
 import org.ofbiz.base.util.StringUtil;
@@ -29,29 +43,16 @@
 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.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.util.EntityUtil;
-import org.ofbiz.security.Security;
 import org.ofbiz.service.DispatchContext;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.service.ModelService;
 import org.ofbiz.service.ServiceUtil;
 
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-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 java.util.Set;
-
 /**
  * ContentServices Class
  */
@@ -64,7 +65,7 @@
      */
     public static Map findRelatedContent(DispatchContext dctx, Map context) {
         LocalDispatcher dispatcher = dctx.getDispatcher();
-        Map results = new HashMap();
+        Map results = FastMap.newInstance();
 
         GenericValue currentContent = (GenericValue) context.get("currentContent");
         String fromDate = (String) context.get("fromDate");
@@ -803,23 +804,23 @@
             }
 
             List exprList = new ArrayList();
-            exprList.add(new EntityExpr("mapKey", EntityOperator.EQUALS, mapKey));
+            exprList.add(EntityCondition.makeCondition("mapKey", EntityOperator.EQUALS, mapKey));
             if (sequenceNum != null) {
-                exprList.add(new EntityExpr("sequenceNum", EntityOperator.EQUALS, sequenceNum));
+                exprList.add(EntityCondition.makeCondition("sequenceNum", EntityOperator.EQUALS, sequenceNum));
             }
-            exprList.add(new EntityExpr("mapKey", EntityOperator.EQUALS, mapKey));
-            exprList.add(new EntityExpr("thruDate", EntityOperator.EQUALS, null));
-            exprList.add(new EntityExpr("contentIdTo", EntityOperator.EQUALS, contentIdTo));
-            exprList.add(new EntityExpr("contentAssocTypeId", EntityOperator.EQUALS, contentAssocTypeId));
+            exprList.add(EntityCondition.makeCondition("mapKey", EntityOperator.EQUALS, mapKey));
+            exprList.add(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null));
+            exprList.add(EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentIdTo));
+            exprList.add(EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.EQUALS, contentAssocTypeId));
 
             if (UtilValidate.isNotEmpty(activeContentId)) {
-                exprList.add(new EntityExpr("contentId", EntityOperator.NOT_EQUAL, activeContentId));
+                exprList.add(EntityCondition.makeCondition("contentId", EntityOperator.NOT_EQUAL, activeContentId));
             }
             if (UtilValidate.isNotEmpty(contentId)) {
-                exprList.add(new EntityExpr("contentId", EntityOperator.EQUALS, contentId));
+                exprList.add(EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentId));
             }
 
-            EntityConditionList assocExprList = new EntityConditionList(exprList, EntityOperator.AND);
+            EntityConditionList assocExprList = EntityCondition.makeCondition(exprList, EntityOperator.AND);
             List relatedAssocs = delegator.findList("ContentAssoc", assocExprList, null, UtilMisc.toList("fromDate"), null, false);
             //if (Debug.infoOn()) Debug.logInfo("in deactivateAssocs, relatedAssocs:" + relatedAssocs, module);
             List filteredAssocs = EntityUtil.filterByDate(relatedAssocs);

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java Wed May 28 00:22:59 2008
@@ -34,6 +34,7 @@
 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.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
@@ -86,14 +87,14 @@
         EntityExpr expr = null;
         String viewName = null;
         if (mapKey != null) {
-            EntityExpr mapKeyExpr = new EntityExpr("caMapKey", EntityOperator.EQUALS, mapKey);
+            EntityExpr mapKeyExpr = EntityCondition.makeCondition("caMapKey", EntityOperator.EQUALS, mapKey);
             exprList.add(mapKeyExpr);
         }
         if (direction != null && direction.equalsIgnoreCase("From")) {
-            joinExpr = new EntityExpr("caContentIdTo", EntityOperator.EQUALS, contentId);
+            joinExpr = EntityCondition.makeCondition("caContentIdTo", EntityOperator.EQUALS, contentId);
             viewName = "ContentAssocDataResourceViewFrom";
         } else {
-            joinExpr = new EntityExpr("caContentId", EntityOperator.EQUALS, contentId);
+            joinExpr = EntityCondition.makeCondition("caContentId", EntityOperator.EQUALS, contentId);
             viewName = "ContentAssocDataResourceViewTo";
         }
         exprList.add(joinExpr);
@@ -102,10 +103,10 @@
             Iterator it = assocTypes.iterator();
             while (it.hasNext()) {
                 String assocType = (String)it.next();
-                expr = new EntityExpr("caContentAssocTypeId", EntityOperator.EQUALS, assocType);
+                expr = EntityCondition.makeCondition("caContentAssocTypeId", EntityOperator.EQUALS, assocType);
                 exprListOr.add(expr);
             }
-            EntityConditionList assocExprList = new EntityConditionList(exprListOr, EntityOperator.OR);
+            EntityConditionList assocExprList = EntityCondition.makeCondition(exprListOr, EntityOperator.OR);
 
             exprList.add(assocExprList);
         }
@@ -114,11 +115,11 @@
             Iterator it = contentTypes.iterator();
             while (it.hasNext()) {
                 String contentType = (String)it.next();
-                expr = new EntityExpr("contentTypeId", 
+                expr = EntityCondition.makeCondition("contentTypeId", 
                                   EntityOperator.EQUALS, contentType);
                 exprListOr.add(expr);
             }
-            EntityConditionList contentExprList = new EntityConditionList(exprListOr, EntityOperator.OR);
+            EntityConditionList contentExprList = EntityCondition.makeCondition(exprListOr, EntityOperator.OR);
             exprList.add(contentExprList);
         }
 
@@ -130,30 +131,30 @@
         }
 
         if (fromDate != null) {
-            EntityExpr fromExpr = new EntityExpr("caFromDate", EntityOperator.LESS_THAN, fromDate);
+            EntityExpr fromExpr = EntityCondition.makeCondition("caFromDate", EntityOperator.LESS_THAN, fromDate);
             exprList.add(fromExpr);
         }
         if (thruDate != null) {
             List thruList = new ArrayList();
             //thruDate = UtilDateTime.getDayStart(thruDate, daysLater);
 
-            EntityExpr thruExpr = new EntityExpr("caThruDate", EntityOperator.LESS_THAN, thruDate);
+            EntityExpr thruExpr = EntityCondition.makeCondition("caThruDate", EntityOperator.LESS_THAN, thruDate);
             thruList.add(thruExpr);
-            EntityExpr thruExpr2 = new EntityExpr("caThruDate", EntityOperator.EQUALS, null);
+            EntityExpr thruExpr2 = EntityCondition.makeCondition("caThruDate", EntityOperator.EQUALS, null);
             thruList.add(thruExpr2);
-            EntityConditionList thruExprList = new EntityConditionList(thruList, EntityOperator.OR);
+            EntityConditionList thruExprList = EntityCondition.makeCondition(thruList, EntityOperator.OR);
             exprList.add(thruExprList);
         } else if (fromDate != null) {
             List thruList = new ArrayList();
 
-            EntityExpr thruExpr = new EntityExpr("caThruDate", EntityOperator.GREATER_THAN, fromDate);
+            EntityExpr thruExpr = EntityCondition.makeCondition("caThruDate", EntityOperator.GREATER_THAN, fromDate);
             thruList.add(thruExpr);
-            EntityExpr thruExpr2 = new EntityExpr("caThruDate", EntityOperator.EQUALS, null);
+            EntityExpr thruExpr2 = EntityCondition.makeCondition("caThruDate", EntityOperator.EQUALS, null);
             thruList.add(thruExpr2);
-            EntityConditionList thruExprList = new EntityConditionList(thruList, EntityOperator.OR);
+            EntityConditionList thruExprList = EntityCondition.makeCondition(thruList, EntityOperator.OR);
             exprList.add(thruExprList);
         }
-        EntityConditionList assocExprList = new EntityConditionList(exprList, EntityOperator.AND);
+        EntityConditionList assocExprList = EntityCondition.makeCondition(exprList, EntityOperator.AND);
         List relatedAssocs = null;
         try {
             //relatedAssocs = delegator.findByCondition(viewName, joinExpr, 
@@ -367,21 +368,21 @@
         if (direction != null && direction.equalsIgnoreCase("From")) {
             viewName = "ContentAssocDataResourceViewFrom";
             contentFieldName = "contentIdTo";
-            joinExpr = new EntityExpr("caContentIdTo", EntityOperator.EQUALS, contentId);
+            joinExpr = EntityCondition.makeCondition("caContentIdTo", EntityOperator.EQUALS, contentId);
         } else {
             viewName = "ContentAssocDataResourceViewTo";
             contentFieldName = "contentId";
-            joinExpr = new EntityExpr("caContentId", EntityOperator.EQUALS, contentId);
+            joinExpr = EntityCondition.makeCondition("caContentId", EntityOperator.EQUALS, contentId);
         }
         exprList.add(joinExpr);
 
         if (UtilValidate.isNotEmpty(assocType)) {
-            expr = new EntityExpr("caContentAssocTypeId", EntityOperator.EQUALS, assocType);
+            expr = EntityCondition.makeCondition("caContentAssocTypeId", EntityOperator.EQUALS, assocType);
             exprList.add(expr);
         }
 
         if (UtilValidate.isNotEmpty(contentType)) {
-            expr = new EntityExpr("caContentTypeId", EntityOperator.EQUALS, contentType);
+            expr = EntityCondition.makeCondition("caContentTypeId", EntityOperator.EQUALS, contentType);
             exprList.add(expr);
         }
 

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Wed May 28 00:22:59 2008
@@ -33,6 +33,8 @@
 
 import javax.xml.parsers.ParserConfigurationException;
 
+import javolution.util.FastMap;
+
 import org.ofbiz.base.util.BshUtil;
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.GeneralException;
@@ -47,19 +49,23 @@
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericPK;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityConditionList;
 import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.minilang.MiniLangException;
 import org.ofbiz.minilang.SimpleMapProcessor;
-import org.ofbiz.service.*;
+import org.ofbiz.service.DispatchContext;
+import org.ofbiz.service.GenericServiceException;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ModelService;
+import org.ofbiz.service.ServiceUtil;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
 import bsh.EvalError;
 import freemarker.ext.dom.NodeModel;
-import javolution.util.FastMap;
 
 /**
  * ContentWorker Class
@@ -286,13 +292,13 @@
 
         // find the sub-content with matching mapKey
         List orderBy = UtilMisc.toList("-fromDate");
-        List exprs = UtilMisc.toList(new EntityExpr("contentId", EntityOperator.EQUALS, contentId));
+        List exprs = UtilMisc.toList(EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentId));
         if (UtilValidate.isNotEmpty(mapKey)) {
-                exprs.add(new EntityExpr("mapKey", EntityOperator.EQUALS, mapKey));
+                exprs.add(EntityCondition.makeCondition("mapKey", EntityOperator.EQUALS, mapKey));
         }
 
         List assocs;
-        assocs = delegator.findList("ContentAssoc", new EntityConditionList(exprs, EntityOperator.AND), null, orderBy, null, cache);
+        assocs = delegator.findList("ContentAssoc", EntityCondition.makeCondition(exprs, EntityOperator.AND), null, orderBy, null, cache);
         assocs = EntityUtil.filterByDate(assocs);
         GenericValue subContent = EntityUtil.getFirst(assocs);
 
@@ -741,7 +747,7 @@
             contentIdName = contentIdName.concat("To");
             contentAssocViewName = contentAssocViewName.concat("To");
         }
-        EntityExpr expr = new EntityExpr(contentIdName, EntityOperator.EQUALS, origContentId);
+        EntityExpr expr = EntityCondition.makeCondition(contentIdName, EntityOperator.EQUALS, origContentId);
         exprListAnd.add(expr);
 
         if (contentTypes.size() > 0) {
@@ -749,10 +755,10 @@
             Iterator it = contentTypes.iterator();
             while (it.hasNext()) {
                 String contentType = (String) it.next();
-                expr = new EntityExpr("contentTypeId", EntityOperator.EQUALS, contentType);
+                expr = EntityCondition.makeCondition("contentTypeId", EntityOperator.EQUALS, contentType);
                 exprListOr.add(expr);
             }
-            EntityConditionList contentExprList = new EntityConditionList(exprListOr, EntityOperator.OR);
+            EntityConditionList contentExprList = EntityCondition.makeCondition(exprListOr, EntityOperator.OR);
             exprListAnd.add(contentExprList);
         }
         if (assocTypes.size() > 0) {
@@ -760,25 +766,25 @@
             Iterator it = assocTypes.iterator();
             while (it.hasNext()) {
                 String assocType = (String) it.next();
-                expr = new EntityExpr("contentAssocTypeId", EntityOperator.EQUALS, assocType);
+                expr = EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.EQUALS, assocType);
                 exprListOr.add(expr);
             }
-            EntityConditionList assocExprList = new EntityConditionList(exprListOr, EntityOperator.OR);
+            EntityConditionList assocExprList = EntityCondition.makeCondition(exprListOr, EntityOperator.OR);
             exprListAnd.add(assocExprList);
         }
 
         if (fromDate != null) {
             Timestamp tsFrom = UtilDateTime.toTimestamp(fromDate);
-            expr = new EntityExpr("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, tsFrom);
+            expr = EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, tsFrom);
             exprListAnd.add(expr);
         }
 
         if (thruDate != null) {
             Timestamp tsThru = UtilDateTime.toTimestamp(thruDate);
-            expr = new EntityExpr("thruDate", EntityOperator.LESS_THAN, tsThru);
+            expr = EntityCondition.makeCondition("thruDate", EntityOperator.LESS_THAN, tsThru);
             exprListAnd.add(expr);
         }
-        EntityConditionList contentCondList = new EntityConditionList(exprListAnd, EntityOperator.AND);
+        EntityConditionList contentCondList = EntityCondition.makeCondition(exprListAnd, EntityOperator.AND);
         GenericDelegator delegator = currentContent.getDelegator();
         contentList = delegator.findList(contentAssocViewName, contentCondList, null, null, null, false);
         return contentList;
@@ -805,9 +811,9 @@
         EntityExpr joinExpr = null;
         EntityExpr expr = null;
         if (direction != null && direction.equalsIgnoreCase("From")) {
-            joinExpr = new EntityExpr("contentIdTo", EntityOperator.EQUALS, contentId);
+            joinExpr = EntityCondition.makeCondition("contentIdTo", EntityOperator.EQUALS, contentId);
         } else {
-            joinExpr = new EntityExpr("contentId", EntityOperator.EQUALS, contentId);
+            joinExpr = EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentId);
         }
         exprList.add(joinExpr);
         if (assocTypes != null && assocTypes.size() > 0) {
@@ -815,40 +821,40 @@
             Iterator it = assocTypes.iterator();
             while (it.hasNext()) {
                 String assocType = (String) it.next();
-                expr = new EntityExpr("contentAssocTypeId", EntityOperator.EQUALS, assocType);
+                expr = EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.EQUALS, assocType);
                 exprListOr.add(expr);
             }
-            EntityConditionList assocExprList = new EntityConditionList(exprListOr, EntityOperator.OR);
+            EntityConditionList assocExprList = EntityCondition.makeCondition(exprListOr, EntityOperator.OR);
             exprList.add(assocExprList);
         }
         if (fromDate != null) {
-            EntityExpr fromExpr = new EntityExpr("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate);
+            EntityExpr fromExpr = EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate);
             exprList.add(fromExpr);
         }
         if (thruDate != null) {
             List thruList = new ArrayList();
             //thruDate = UtilDateTime.getDayStart(thruDate, daysLater);
 
-            EntityExpr thruExpr = new EntityExpr("thruDate", EntityOperator.LESS_THAN, thruDate);
+            EntityExpr thruExpr = EntityCondition.makeCondition("thruDate", EntityOperator.LESS_THAN, thruDate);
             thruList.add(thruExpr);
-            EntityExpr thruExpr2 = new EntityExpr("thruDate", EntityOperator.EQUALS, null);
+            EntityExpr thruExpr2 = EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null);
             thruList.add(thruExpr2);
-            EntityConditionList thruExprList = new EntityConditionList(thruList, EntityOperator.OR);
+            EntityConditionList thruExprList = EntityCondition.makeCondition(thruList, EntityOperator.OR);
             exprList.add(thruExprList);
         } else if (fromDate != null) {
             List thruList = new ArrayList();
 
-            EntityExpr thruExpr = new EntityExpr("thruDate", EntityOperator.GREATER_THAN, fromDate);
+            EntityExpr thruExpr = EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, fromDate);
             thruList.add(thruExpr);
-            EntityExpr thruExpr2 = new EntityExpr("thruDate", EntityOperator.EQUALS, null);
+            EntityExpr thruExpr2 = EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null);
             thruList.add(thruExpr2);
-            EntityConditionList thruExprList = new EntityConditionList(thruList, EntityOperator.OR);
+            EntityConditionList thruExprList = EntityCondition.makeCondition(thruList, EntityOperator.OR);
             exprList.add(thruExprList);
         } else {
-            EntityExpr thruExpr2 = new EntityExpr("thruDate", EntityOperator.EQUALS, null);
+            EntityExpr thruExpr2 = EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null);
             exprList.add(thruExpr2);
         }
-        EntityConditionList assocExprList = new EntityConditionList(exprList, EntityOperator.AND);
+        EntityConditionList assocExprList = EntityCondition.makeCondition(exprList, EntityOperator.AND);
         //if (Debug.infoOn()) Debug.logInfo(" assocExprList:" + assocExprList , "");
         List relatedAssocs = delegator.findList("ContentAssoc", assocExprList, null, UtilMisc.toList("-fromDate"), null, false);
         //if (Debug.infoOn()) Debug.logInfo(" relatedAssoc:" + relatedAssocs.size() , "");
@@ -1349,31 +1355,31 @@
         List exprListAnd = new ArrayList();
 
         if (UtilValidate.isNotEmpty(contentIdTo)) {
-            EntityExpr expr = new EntityExpr("caContentIdTo", EntityOperator.EQUALS, contentIdTo);
+            EntityExpr expr = EntityCondition.makeCondition("caContentIdTo", EntityOperator.EQUALS, contentIdTo);
             exprListAnd.add(expr);
         }
 
         if (UtilValidate.isNotEmpty(contentId)) {
-            EntityExpr expr = new EntityExpr("contentId", EntityOperator.EQUALS, contentId);
+            EntityExpr expr = EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentId);
             exprListAnd.add(expr);
         }
 
         if (UtilValidate.isNotEmpty(contentAssocTypeId)) {
-            EntityExpr expr = new EntityExpr("caContentAssocTypeId", EntityOperator.EQUALS, contentAssocTypeId);
+            EntityExpr expr = EntityCondition.makeCondition("caContentAssocTypeId", EntityOperator.EQUALS, contentAssocTypeId);
             exprListAnd.add(expr);
         }
 
         if (UtilValidate.isNotEmpty(statusId)) {
-            EntityExpr expr = new EntityExpr("statusId", EntityOperator.EQUALS, statusId);
+            EntityExpr expr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, statusId);
             exprListAnd.add(expr);
         }
 
         if (UtilValidate.isNotEmpty(privilegeEnumId)) {
-            EntityExpr expr = new EntityExpr("privilegeEnumId", EntityOperator.EQUALS, privilegeEnumId);
+            EntityExpr expr = EntityCondition.makeCondition("privilegeEnumId", EntityOperator.EQUALS, privilegeEnumId);
             exprListAnd.add(expr);
         }
 
-        EntityConditionList contentCondList = new EntityConditionList(exprListAnd, EntityOperator.AND);
+        EntityConditionList contentCondList = EntityCondition.makeCondition(exprListAnd, EntityOperator.AND);
         List contentList = delegator.findList("ContentAssocDataResourceViewFrom", contentCondList, null, null, null, false);
         List filteredList = EntityUtil.filterByDate(contentList, UtilDateTime.nowTimestamp(), "caFromDate", "caThruDate", true);
         return filteredList;

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java Wed May 28 00:22:59 2008
@@ -341,7 +341,7 @@
     public long getNumberResponses() throws SurveyWrapperException {
         long responses = 0;
         try {
-            responses = delegator.findCountByCondition("SurveyResponse", new EntityExpr("surveyId", EntityOperator.EQUALS, surveyId), null, null);
+            responses = delegator.findCountByCondition("SurveyResponse", EntityCondition.makeCondition("surveyId", EntityOperator.EQUALS, surveyId), null, null);
         } catch (GenericEntityException e) {
             throw new SurveyWrapperException(e);
         }
@@ -720,9 +720,9 @@
     }
 
     private EntityCondition makeEliCondition(GenericValue question) {
-        return new EntityConditionList(UtilMisc.toList(new EntityExpr("surveyQuestionId",
+        return EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("surveyQuestionId",
                 EntityOperator.EQUALS, question.getString("surveyQuestionId")),
-                new EntityExpr("surveyId", EntityOperator.EQUALS, surveyId)), EntityOperator.AND);
+                EntityCondition.makeCondition("surveyId", EntityOperator.EQUALS, surveyId)), EntityOperator.AND);
     }
 
     private EntityListIterator getEli(GenericValue question) throws GenericEntityException {

Modified: ofbiz/trunk/applications/content/widget/cms/mostrecentprep.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/cms/mostrecentprep.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/cms/mostrecentprep.bsh (original)
+++ ofbiz/trunk/applications/content/widget/cms/mostrecentprep.bsh Wed May 28 00:22:59 2008
@@ -60,19 +60,19 @@
     exprList = new ArrayList();
     fromDate = UtilDateTime.nowTimestamp();
     //thruList = new ArrayList();
-    //thruExpr = new EntityExpr("caThruDate", EntityOperator.GREATER_THAN, fromDate);
+    //thruExpr = EntityCondition.makeCondition("caThruDate", EntityOperator.GREATER_THAN, fromDate);
     //thruList.add(thruExpr);
-    thruExpr2 = new EntityExpr("caThruDate", EntityOperator.EQUALS, null);
+    thruExpr2 = EntityCondition.makeCondition("caThruDate", EntityOperator.EQUALS, null);
     //thruList.add(thruExpr2);
-    //thruExprList = new EntityConditionList(thruList, EntityOperator.OR);
+    //thruExprList = EntityCondition.makeCondition(thruList, EntityOperator.OR);
     exprList.add(thruExpr2);
-    //contentAssocTypeExpr = new EntityExpr("caContentAssocTypeId", EntityOperator.EQUALS, "RESPONSE");
+    //contentAssocTypeExpr = EntityCondition.makeCondition("caContentAssocTypeId", EntityOperator.EQUALS, "RESPONSE");
     //exprList.add(contentAssocTypeExpr);
-    statusIdExpr = new EntityExpr("statusId", EntityOperator.EQUALS, "CTNT_IN_PROGRESS");
+    statusIdExpr = EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "CTNT_IN_PROGRESS");
     exprList.add(statusIdExpr);
-    contentIdToExpr = new EntityExpr("caContentIdTo", EntityOperator.EQUALS, forumId);
+    contentIdToExpr = EntityCondition.makeCondition("caContentIdTo", EntityOperator.EQUALS, forumId);
     exprList.add(contentIdToExpr);
-    expr = new EntityConditionList(exprList, EntityOperator.AND);
+    expr = EntityCondition.makeCondition(exprList, EntityOperator.AND);
     entityList = delegator.findList("ContentAssocViewFrom", expr, null, UtilMisc.toList("-caFromDate"), null, false);
     
     Debug.logInfo("in mostrecentprep(1), entityList.size():" + entityList.size(),"");

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/showcart.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/showcart.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/showcart.bsh (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/cart/showcart.bsh Wed May 28 00:22:59 2008
@@ -47,9 +47,9 @@
 
 // get the shopping lists for the logged in user
 if (userLogin != null) {
-    exprList = UtilMisc.toList(new EntityExpr("partyId", EntityOperator.EQUALS, userLogin.getString("partyId")),
-        new EntityExpr("listName", EntityOperator.NOT_EQUAL, "auto-save"));
-    condition = new EntityConditionList(exprList, EntityOperator.AND);
+    exprList = UtilMisc.toList(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, userLogin.getString("partyId")),
+        EntityCondition.makeCondition("listName", EntityOperator.NOT_EQUAL, "auto-save"));
+    condition = EntityCondition.makeCondition(exprList, EntityOperator.AND);
     allShoppingLists = delegator.findList("ShoppingList", condition, null, UtilMisc.toList("listName"), null, false);
     context.put("shoppingLists", allShoppingLists);
 }

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/customer/viewprofile.bsh Wed May 28 00:22:59 2008
@@ -58,9 +58,9 @@
     orderBy = UtilMisc.toList("-entryDate");
     findOpts = new EntityFindOptions();
     findOpts.setMaxRows(5);
-    exprs = UtilMisc.toList(new EntityExpr("partyIdTo", EntityOperator.EQUALS, partyId));
-    exprs.add(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "COM_READ"));
-    condition = new EntityConditionList(exprs, EntityOperator.AND);
+    exprs = UtilMisc.toList(EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, partyId));
+    exprs.add(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "COM_READ"));
+    condition = EntityCondition.makeCondition(exprs, EntityOperator.AND);
     messages = delegator.findList("CommunicationEvent", condition, null, orderBy, findOpts, false);
     context.put("messages", messages);
     context.put("profileMessages", true);

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderhistory.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderhistory.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderhistory.bsh (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderhistory.bsh Wed May 28 00:22:59 2008
@@ -25,11 +25,11 @@
 if((partyRole != null) && (partyRole.get("roleTypeId").equals("SUPPLIER"))){
     /** drop shipper or supplier **/
     porderRoleCollection = delegator.findByAnd("OrderRole", UtilMisc.toMap("partyId", userLogin.get("partyId"), "roleTypeId", "SUPPLIER_AGENT"));
-    porderHeaderList = EntityUtil.orderBy(EntityUtil.filterByAnd(EntityUtil.getRelated("OrderHeader", porderRoleCollection), UtilMisc.toList(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),new EntityExpr("orderTypeId", EntityOperator.EQUALS, "PURCHASE_ORDER"))), UtilMisc.toList("orderDate DESC"));
+    porderHeaderList = EntityUtil.orderBy(EntityUtil.filterByAnd(EntityUtil.getRelated("OrderHeader", porderRoleCollection), UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"),EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "PURCHASE_ORDER"))), UtilMisc.toList("orderDate DESC"));
     context.put("porderHeaderList", porderHeaderList);
 }
 orderRoleCollection = delegator.findByAnd("OrderRole", UtilMisc.toMap("partyId", userLogin.get("partyId"), "roleTypeId", "PLACING_CUSTOMER"));
-orderHeaderList = EntityUtil.orderBy(EntityUtil.filterByAnd(EntityUtil.getRelated("OrderHeader", orderRoleCollection), UtilMisc.toList(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"))), UtilMisc.toList("orderDate DESC"));
+orderHeaderList = EntityUtil.orderBy(EntityUtil.filterByAnd(EntityUtil.getRelated("OrderHeader", orderRoleCollection), UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "ORDER_REJECTED"))), UtilMisc.toList("orderDate DESC"));
 context.put("orderHeaderList", orderHeaderList);
 
 downloadOrderRoleAndProductContentInfoList = delegator.findByAnd("OrderRoleAndProductContentInfo", 

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/orderstatus.bsh Wed May 28 00:22:59 2008
@@ -100,7 +100,7 @@
     billingAccount = orderHeader.getRelatedOne("BillingAccount");
   
     orderPaymentPreferences = UtilMisc.toIterator(EntityUtil.filterByAnd(orderHeader.getRelated("OrderPaymentPreference"),
-            UtilMisc.toList(new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED"))));
+            UtilMisc.toList(EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED"))));
     paymentMethods = new ArrayList();
     if (orderPaymentPreferences != null) {
         while (orderPaymentPreferences.hasNext()) {
@@ -127,7 +127,7 @@
     if (paymentAddress != null) context.put("paymentAddress", paymentAddress);  
      
     // get Shipment tracking info
-    osisCond = new EntityFieldMap(UtilMisc.toMap("orderId", orderId), EntityOperator.AND);
+    osisCond = EntityCondition.makeCondition(UtilMisc.toMap("orderId", orderId), EntityOperator.AND);
     osisOrder = UtilMisc.toList("shipmentId", "shipmentRouteSegmentId", "shipmentPackageSeqId");
     osisFields = UtilMisc.toSet("shipmentId", "shipmentRouteSegmentId", "carrierPartyId", "shipmentMethodTypeId");
     osisFields.add("shipmentPackageSeqId");

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/order/shipmentstatus.bsh Wed May 28 00:22:59 2008
@@ -29,7 +29,7 @@
     shipmentItems = delegator.findByAnd("ShipmentItem", UtilMisc.toMap("shipmentId", shipmentId));
 
     // get Shipment tracking info
-    osisCond = new EntityFieldMap(UtilMisc.toMap("shipmentId", shipmentId), EntityOperator.AND);
+    osisCond = EntityCondition.makeCondition(UtilMisc.toMap("shipmentId", shipmentId), EntityOperator.AND);
     osisOrder = UtilMisc.toList("shipmentId", "shipmentRouteSegmentId", "shipmentPackageSeqId");
     osisFields = UtilMisc.toSet("shipmentId", "shipmentRouteSegmentId", "shipmentPackageSeqId", "carrierPartyId", "trackingCode");
     osisFindOptions = new EntityFindOptions(); 

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/editShoppingList.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/editShoppingList.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/editShoppingList.bsh (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/actions/shoppinglist/editShoppingList.bsh Wed May 28 00:22:59 2008
@@ -46,9 +46,9 @@
 context.put("currencyUomId", currencyUomId);
 
 // get the top level shopping lists for the logged in user
-exprList = UtilMisc.toList(new EntityExpr("partyId", EntityOperator.EQUALS, userLogin.getString("partyId")),
-        new EntityExpr("listName", EntityOperator.NOT_EQUAL, "auto-save"));
-condition = new EntityConditionList(exprList, EntityOperator.AND);
+exprList = UtilMisc.toList(EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, userLogin.getString("partyId")),
+        EntityCondition.makeCondition("listName", EntityOperator.NOT_EQUAL, "auto-save"));
+condition = EntityCondition.makeCondition(exprList, EntityOperator.AND);
 allShoppingLists = delegator.findList("ShoppingList", condition, null, UtilMisc.toList("listName"), null, false);
 shoppingLists = EntityUtil.filterByAnd(allShoppingLists, UtilMisc.toMap("parentShoppingListId", null));
 context.put("allShoppingLists", allShoppingLists);

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java Wed May 28 00:22:59 2008
@@ -18,6 +18,7 @@
  *******************************************************************************/
 package org.ofbiz.manufacturing.jobshopmgt;
 
+import java.math.BigDecimal;
 import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Date;
@@ -29,22 +30,23 @@
 import java.util.Map;
 import java.util.SortedMap;
 import java.util.TreeMap;
-import java.math.BigDecimal;
+
+import javolution.util.FastList;
+import javolution.util.FastMap;
 
 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.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
-import org.ofbiz.base.util.UtilNumber;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
-import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.GenericPK;
-import org.ofbiz.entity.util.EntityUtil;
-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.manufacturing.bom.BOMTree;
 import org.ofbiz.manufacturing.techdata.TechDataServices;
 import org.ofbiz.product.config.ProductConfigWrapper;
@@ -56,9 +58,6 @@
 import org.ofbiz.service.ModelService;
 import org.ofbiz.service.ServiceUtil;
 
-import javolution.util.FastList;
-import javolution.util.FastMap;
-
 /**
  * Services for Production Run maintenance
  *
@@ -2669,18 +2668,18 @@
         try {
             List findOutgoingProductionRunsConds = new LinkedList();
 
-            findOutgoingProductionRunsConds.add(new EntityExpr("productId", EntityOperator.EQUALS, productId));
-            findOutgoingProductionRunsConds.add(new EntityExpr("statusId", EntityOperator.EQUALS, "WEGS_CREATED"));
-            findOutgoingProductionRunsConds.add(new EntityExpr("estimatedStartDate", EntityOperator.LESS_THAN_EQUAL_TO, startDate));
+            findOutgoingProductionRunsConds.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId));
+            findOutgoingProductionRunsConds.add(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "WEGS_CREATED"));
+            findOutgoingProductionRunsConds.add(EntityCondition.makeCondition("estimatedStartDate", EntityOperator.LESS_THAN_EQUAL_TO, startDate));
 
             List findOutgoingProductionRunsStatusConds = new LinkedList();
-            findOutgoingProductionRunsStatusConds.add(new EntityExpr("currentStatusId", EntityOperator.EQUALS, "PRUN_CREATED"));
-            findOutgoingProductionRunsStatusConds.add(new EntityExpr("currentStatusId", EntityOperator.EQUALS, "PRUN_SCHEDULED"));
-            findOutgoingProductionRunsStatusConds.add(new EntityExpr("currentStatusId", EntityOperator.EQUALS, "PRUN_DOC_PRINTED"));
-            findOutgoingProductionRunsStatusConds.add(new EntityExpr("currentStatusId", EntityOperator.EQUALS, "PRUN_RUNNING"));
-            findOutgoingProductionRunsConds.add(new EntityConditionList(findOutgoingProductionRunsStatusConds, EntityOperator.OR));
+            findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_CREATED"));
+            findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_SCHEDULED"));
+            findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_DOC_PRINTED"));
+            findOutgoingProductionRunsStatusConds.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "PRUN_RUNNING"));
+            findOutgoingProductionRunsConds.add(EntityCondition.makeCondition(findOutgoingProductionRunsStatusConds, EntityOperator.OR));
 
-            List outgoingProductionRuns = delegator.findList("WorkEffortAndGoods", new EntityConditionList(findOutgoingProductionRunsConds, EntityOperator.AND), null, UtilMisc.toList("-estimatedStartDate"), null, false);
+            List outgoingProductionRuns = delegator.findList("WorkEffortAndGoods", EntityCondition.makeCondition(findOutgoingProductionRunsConds, EntityOperator.AND), null, UtilMisc.toList("-estimatedStartDate"), null, false);
             if (outgoingProductionRuns != null) {
                 for (int i = 0; i < outgoingProductionRuns.size(); i++) {
                     GenericValue outgoingProductionRun = (GenericValue)outgoingProductionRuns.get(i);
@@ -2945,11 +2944,11 @@
 
             // backorders
             List backordersCondList = FastList.newInstance();
-            backordersCondList.add(new EntityExpr("quantityNotAvailable", EntityOperator.NOT_EQUAL, null));
-            backordersCondList.add(new EntityExpr("quantityNotAvailable", EntityOperator.GREATER_THAN, new Double(0.0)));
-            //backordersCondList.add(new EntityExpr(new EntityExpr("statusId", EntityOperator.EQUALS, "ITEM_CREATED"), EntityOperator.OR, new EntityExpr("statusId", EntityOperator.LESS_THAN, "ITEM_APPROVED")));
+            backordersCondList.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.NOT_EQUAL, null));
+            backordersCondList.add(EntityCondition.makeCondition("quantityNotAvailable", EntityOperator.GREATER_THAN, new Double(0.0)));
+            //backordersCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "ITEM_CREATED"), EntityOperator.OR, EntityCondition.makeCondition("statusId", EntityOperator.LESS_THAN, "ITEM_APPROVED")));
 
-            List backorders = delegator.findList("OrderItemAndShipGrpInvResAndItem", new EntityConditionList(backordersCondList, EntityOperator.AND), null, UtilMisc.toList("shipBeforeDate"), null, false);
+            List backorders = delegator.findList("OrderItemAndShipGrpInvResAndItem", EntityCondition.makeCondition(backordersCondList, EntityOperator.AND), null, UtilMisc.toList("shipBeforeDate"), null, false);
             Iterator backordersIt = backorders.iterator();
             while (backordersIt.hasNext()) {
                 GenericValue genericResult = (GenericValue) backordersIt.next();

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java Wed May 28 00:22:59 2008
@@ -247,11 +247,11 @@
         try {
             List facilityContactMechs = EntityUtil.filterByDate(delegator.findByAnd("FacilityContactMech", UtilMisc.toMap("facilityId", facilityId)));
             List facilityContactMechIds = EntityUtil.getFieldListFromEntityList(facilityContactMechs, "contactMechId", true);
-            List searchConditions = UtilMisc.toList(new EntityExpr("orderTypeId", EntityOperator.EQUALS, "PURCHASE_ORDER"),
-                                                    new EntityExpr("oiStatusId", EntityOperator.EQUALS, "ITEM_APPROVED"),
-                                                    new EntityExpr("contactMechId", EntityOperator.IN, facilityContactMechIds));
+            List searchConditions = UtilMisc.toList(EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, "PURCHASE_ORDER"),
+                                                    EntityCondition.makeCondition("oiStatusId", EntityOperator.EQUALS, "ITEM_APPROVED"),
+                                                    EntityCondition.makeCondition("contactMechId", EntityOperator.IN, facilityContactMechIds));
             Set fieldsToSelect = UtilMisc.toSet("orderId", "orderItemSeqId", "productId", "quantity", "cancelQuantity", "oiEstimatedDeliveryDate");
-            resultList = delegator.findList("OrderHeaderItemAndShipGroup", new EntityConditionList(searchConditions, EntityOperator.AND), fieldsToSelect, UtilMisc.toList("orderDate"), null, false);
+            resultList = delegator.findList("OrderHeaderItemAndShipGroup", EntityCondition.makeCondition(searchConditions, EntityOperator.AND), fieldsToSelect, UtilMisc.toList("orderDate"), null, false);
 
         } catch(GenericEntityException e) {
             return ServiceUtil.returnError("Problem, we can not find the order items, for more detail look at the log");
@@ -413,7 +413,7 @@
                 minimumStock = new Double(0);
             }
             try {
-                EntityFieldMap ecl = new EntityFieldMap(UtilMisc.toMap("mrpId", mrpId, "productId", productId), EntityOperator.AND);
+                EntityFieldMap ecl = EntityCondition.makeCondition(UtilMisc.toMap("mrpId", mrpId, "productId", productId), EntityOperator.AND);
                 long numOfEvents = delegator.findCountByCondition("MrpEvent", ecl, null, null);
                 if (numOfEvents > 0) {
                     continue;
@@ -627,11 +627,11 @@
             // Find all products in MrpEventView, ordered by bom and eventDate
             EntityCondition filterByConditions = null;
             if (bomLevel == 0) {
-                filterByConditions = new EntityExpr(new EntityExpr("billOfMaterialLevel", EntityOperator.EQUALS, null),
+                filterByConditions = EntityCondition.makeCondition(EntityCondition.makeCondition("billOfMaterialLevel", EntityOperator.EQUALS, null),
                                             EntityOperator.OR,
-                                            new EntityExpr("billOfMaterialLevel", EntityOperator.EQUALS, new Long(bomLevel)));
+                                            EntityCondition.makeCondition("billOfMaterialLevel", EntityOperator.EQUALS, new Long(bomLevel)));
             } else {
-                filterByConditions = new EntityExpr("billOfMaterialLevel", EntityOperator.EQUALS, new Long(bomLevel));
+                filterByConditions = EntityCondition.makeCondition("billOfMaterialLevel", EntityOperator.EQUALS, new Long(bomLevel));
             }
             try{
                 listInventoryEventForMRP = delegator.findList("MrpEventView", filterByConditions, null, UtilMisc.toList("productId", "eventDate"), null, false);

Modified: ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java (original)
+++ ofbiz/trunk/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java Wed May 28 00:22:59 2008
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.ofbiz.manufacturing.techdata;
 
 import java.sql.Time;
@@ -33,6 +33,7 @@
 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.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
@@ -67,14 +68,14 @@
         List constraints = new LinkedList();
         
         if (workEffortName != null && workEffortName.length()>0)
-            constraints.add(new EntityExpr("workEffortName", EntityOperator.GREATER_THAN_EQUAL_TO, workEffortName));
+            constraints.add(EntityCondition.makeCondition("workEffortName", EntityOperator.GREATER_THAN_EQUAL_TO, workEffortName));
         if (fixedAssetId != null && fixedAssetId.length()>0 && ! "ANY".equals(fixedAssetId))
-            constraints.add(new EntityExpr("fixedAssetId", EntityOperator.EQUALS, fixedAssetId));
+            constraints.add(EntityCondition.makeCondition("fixedAssetId", EntityOperator.EQUALS, fixedAssetId));
         
-        constraints.add(new EntityExpr("currentStatusId", EntityOperator.EQUALS, "ROU_ACTIVE"));
-        constraints.add(new EntityExpr("workEffortTypeId", EntityOperator.EQUALS, "ROU_TASK"));
+        constraints.add(EntityCondition.makeCondition("currentStatusId", EntityOperator.EQUALS, "ROU_ACTIVE"));
+        constraints.add(EntityCondition.makeCondition("workEffortTypeId", EntityOperator.EQUALS, "ROU_TASK"));
         
-        EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(constraints, EntityOperator.AND);
+        EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(constraints, EntityOperator.AND);
         try {
             listRoutingTask = delegator.findList("WorkEffort", ecl, null, UtilMisc.toList("workEffortName"), null, false);
         } catch (GenericEntityException e) {

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/findInventoryEventPlan.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/findInventoryEventPlan.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/findInventoryEventPlan.bsh (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/findInventoryEventPlan.bsh Wed May 28 00:22:59 2008
@@ -56,19 +56,19 @@
     eventDate = eventDate.trim();
     if (eventDate.length() < 14) eventDate = eventDate + " " + "00:00:00.000";
     paramList = paramList + "&eventDate=" + eventDate;
-        andExprs.add(new EntityExpr("eventDate", EntityOperator.GREATER_THAN, eventDate));
+        andExprs.add(EntityCondition.makeCondition("eventDate", EntityOperator.GREATER_THAN, eventDate));
     }
     
     if (productId != null && productId.length() > 0) {
             paramList = paramList + "&productId=" + productId;
         if ( productId.length() > 0)
-        andExprs.add(new EntityExpr("productId", EntityOperator.EQUALS, productId));
+        andExprs.add(EntityCondition.makeCondition("productId", EntityOperator.EQUALS, productId));
     } 
-    andExprs.add(new EntityExpr("mrpEventTypeId", EntityOperator.NOT_EQUAL, "INITIAL_QOH"));
-    andExprs.add(new EntityExpr("mrpEventTypeId", EntityOperator.NOT_EQUAL, "ERROR"));
-    andExprs.add(new EntityExpr("mrpEventTypeId", EntityOperator.NOT_EQUAL, "REQUIRED_MRP"));
+    andExprs.add(EntityCondition.makeCondition("mrpEventTypeId", EntityOperator.NOT_EQUAL, "INITIAL_QOH"));
+    andExprs.add(EntityCondition.makeCondition("mrpEventTypeId", EntityOperator.NOT_EQUAL, "ERROR"));
+    andExprs.add(EntityCondition.makeCondition("mrpEventTypeId", EntityOperator.NOT_EQUAL, "REQUIRED_MRP"));
 
-    mainCond = new EntityConditionList(andExprs, EntityOperator.AND); 
+    mainCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND); 
     
     if ( mainCond != null) {
     // do the lookup

Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/sfa/vcard/VCard.java Wed May 28 00:22:59 2008
@@ -101,15 +101,15 @@
                 serviceCtx.put("address1", workAddress.getStreet());
                 serviceCtx.put("city", workAddress.getCity()); 
                 serviceCtx.put("postalCode", workAddress.getPostalCode());
-                EntityCondition cond = new EntityConditionList(UtilMisc.toList(
-                                                    new EntityExpr("geoTypeId", EntityOperator.EQUALS, "COUNTRY"),
-                                                    new EntityExpr("geoName", EntityOperator.LIKE, workAddress.getCountry())), EntityOperator.AND);
+                EntityCondition cond = EntityCondition.makeCondition(UtilMisc.toList(
+                                                    EntityCondition.makeCondition("geoTypeId", EntityOperator.EQUALS, "COUNTRY"),
+                                                    EntityCondition.makeCondition("geoName", EntityOperator.LIKE, workAddress.getCountry())), EntityOperator.AND);
                 GenericValue countryGeo = EntityUtil.getFirst(delegator.findList("Geo", cond, null, null, null, true));
                 serviceCtx.put("countryGeoId", countryGeo.get("geoId"));
 
-                EntityCondition condition = new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("geoTypeId", EntityOperator.EQUALS, "STATE"),
-                        new EntityExpr("geoName", EntityOperator.LIKE, workAddress.getRegion())), EntityOperator.AND); 
+                EntityCondition condition = EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("geoTypeId", EntityOperator.EQUALS, "STATE"),
+                        EntityCondition.makeCondition("geoName", EntityOperator.LIKE, workAddress.getRegion())), EntityOperator.AND); 
                 GenericValue stateGeo = EntityUtil.getFirst(delegator.findList("Geo", condition, null, null, null, true));
                 serviceCtx.put("stateProvinceGeoId", stateGeo.get("geoId"));
                 

Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.bsh (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/MarketingCampaignReport.bsh Wed May 28 00:22:59 2008
@@ -38,20 +38,20 @@
 orderConditionList = new LinkedList();
 
 if ((fromDateStr != null) && !(fromDateStr.equals(""))) {
-    visitConditionList.add(new EntityExpr("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDateStr));
-    orderConditionList.add(new EntityExpr("orderDate",EntityOperator.GREATER_THAN_EQUAL_TO,fromDateStr));
+    visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDateStr));
+    orderConditionList.add(EntityCondition.makeCondition("orderDate",EntityOperator.GREATER_THAN_EQUAL_TO,fromDateStr));
 }
 if ((thruDateStr != null) && !(thruDateStr.equals(""))) {
-    visitConditionList.add(new EntityExpr("fromDate",EntityOperator.LESS_THAN_EQUAL_TO,thruDateStr));
-    orderConditionList.add(new EntityExpr("orderDate",EntityOperator.LESS_THAN_EQUAL_TO,thruDateStr));
+    visitConditionList.add(EntityCondition.makeCondition("fromDate",EntityOperator.LESS_THAN_EQUAL_TO,thruDateStr));
+    orderConditionList.add(EntityCondition.makeCondition("orderDate",EntityOperator.LESS_THAN_EQUAL_TO,thruDateStr));
 }
 if ((marketingCampaignId != null) && !(marketingCampaignId.equals(""))) {
-    visitConditionList.add(new EntityExpr("marketingCampaignId", EntityOperator.EQUALS, marketingCampaignId));
-    orderConditionList.add(new EntityExpr("marketingCampaignId", EntityOperator.EQUALS, marketingCampaignId));
+    visitConditionList.add(EntityCondition.makeCondition("marketingCampaignId", EntityOperator.EQUALS, marketingCampaignId));
+    orderConditionList.add(EntityCondition.makeCondition("marketingCampaignId", EntityOperator.EQUALS, marketingCampaignId));
 }
 
-visitConditions = new EntityConditionList(visitConditionList, EntityOperator.AND);
-orderConditions = new EntityConditionList(orderConditionList, EntityOperator.AND);
+visitConditions = EntityCondition.makeCondition(visitConditionList, EntityOperator.AND);
+orderConditions = EntityCondition.makeCondition(orderConditionList, EntityOperator.AND);
 
 visits = delegator.findList("MarketingCampaignAndVisit", visitConditions, UtilMisc.toSet("marketingCampaignId", "visitId"), UtilMisc.toList("marketingCampaignId"), null, false);
 orders = delegator.findList("MarketingCampaignAndOrderHeader", orderConditions, UtilMisc.toSet("marketingCampaignId", "orderId", "grandTotal"), UtilMisc.toList("marketingCampaignId"), null, false);

Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.bsh?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.bsh (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.bsh Wed May 28 00:22:59 2008
@@ -38,20 +38,20 @@
 orderConditionList = new LinkedList();
 
 if ((fromDateStr != null) && !(fromDateStr.equals(""))) {
-    visitConditionList.add(new EntityExpr("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDateStr));
-    orderConditionList.add(new EntityExpr("orderDate",EntityOperator.GREATER_THAN_EQUAL_TO,fromDateStr));
+    visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDateStr));
+    orderConditionList.add(EntityCondition.makeCondition("orderDate",EntityOperator.GREATER_THAN_EQUAL_TO,fromDateStr));
 }
 if ((thruDateStr != null) && !(thruDateStr.equals(""))) {
-     visitConditionList.add(new EntityExpr("fromDate",EntityOperator.LESS_THAN_EQUAL_TO,thruDateStr));
-     orderConditionList.add(new EntityExpr("orderDate",EntityOperator.LESS_THAN_EQUAL_TO,thruDateStr));
+     visitConditionList.add(EntityCondition.makeCondition("fromDate",EntityOperator.LESS_THAN_EQUAL_TO,thruDateStr));
+     orderConditionList.add(EntityCondition.makeCondition("orderDate",EntityOperator.LESS_THAN_EQUAL_TO,thruDateStr));
 }
 if ((trackingCodeIdStr != null) && !(trackingCodeIdStr.equals(""))) {
-     visitConditionList.add(new EntityExpr("trackingCodeId", EntityOperator.EQUALS, trackingCodeIdStr));
-     orderConditionList.add(new EntityExpr("trackingCodeId", EntityOperator.EQUALS, trackingCodeIdStr));
+     visitConditionList.add(EntityCondition.makeCondition("trackingCodeId", EntityOperator.EQUALS, trackingCodeIdStr));
+     orderConditionList.add(EntityCondition.makeCondition("trackingCodeId", EntityOperator.EQUALS, trackingCodeIdStr));
 }
 
-visitConditions = new EntityConditionList(visitConditionList, EntityOperator.AND);
-orderConditions = new EntityConditionList(orderConditionList, EntityOperator.AND);
+visitConditions = EntityCondition.makeCondition(visitConditionList, EntityOperator.AND);
+orderConditions = EntityCondition.makeCondition(orderConditionList, EntityOperator.AND);
 
 visits = delegator.findList("TrackingCodeAndVisit", visitConditions, UtilMisc.toSet("trackingCodeId", "visitId"), UtilMisc.toList("trackingCodeId"), null, false);
 orders = delegator.findList("TrackingCodeAndOrderHeader", orderConditions, UtilMisc.toSet("trackingCodeId", "orderId", "grandTotal"), UtilMisc.toList("trackingCodeId"), null, false);

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/OrderManagerEvents.java Wed May 28 00:22:59 2008
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 package org.ofbiz.order;
 
 import java.text.NumberFormat;
@@ -38,14 +38,15 @@
 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.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.order.order.OrderChangeHelper;
-import org.ofbiz.service.ModelService;
-import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.service.GenericServiceException;
+import org.ofbiz.service.LocalDispatcher;
+import org.ofbiz.service.ModelService;
 
 /**
  * Order Manager Events
@@ -149,7 +150,7 @@
         List paymentMethodTypes = null;
 
         try {
-            EntityExpr ee = new EntityExpr("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE");
+            EntityExpr ee = EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.NOT_EQUAL, "EXT_OFFLINE");
             paymentMethodTypes = delegator.findList("PaymentMethodType", ee, null, null, null, false);
         } catch (GenericEntityException e) {
             Debug.logError(e, "Problems getting payment types", module);
@@ -237,9 +238,9 @@
         List currentPrefs = null;
         double paymentTally = 0.00;
         try {
-            EntityConditionList<EntityExpr> ecl = new EntityConditionList<EntityExpr>(UtilMisc.toList(
-                    new EntityExpr("orderId", EntityOperator.EQUALS, orderId),
-                    new EntityExpr("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")),
+            EntityConditionList<EntityExpr> ecl = EntityCondition.makeCondition(UtilMisc.toList(
+                    EntityCondition.makeCondition("orderId", EntityOperator.EQUALS, orderId),
+                    EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PAYMENT_CANCELLED")),
                     EntityOperator.AND);
             currentPrefs = delegator.findList("OrderPaymentPreference", ecl, null, null, null, false);
         } catch (GenericEntityException e) {

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/finaccount/FinAccountHelper.java Wed May 28 00:22:59 2008
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *******************************************************************************/
+ */
 
 package org.ofbiz.order.finaccount;
 
@@ -25,13 +25,17 @@
 import java.util.Random;
 import java.util.regex.Pattern;
 
-import org.ofbiz.base.util.*;
+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.base.util.UtilValidate;
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntity;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityConditionList;
-import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.util.EntityUtil;
@@ -184,23 +188,23 @@
         String currencyUomId = finAccount.getString("currencyUomId");
          
         // find the sum of all transactions which increase the value
-        EntityConditionList incrementConditions = new EntityConditionList(UtilMisc.toList(
-                new EntityExpr("finAccountId", EntityOperator.EQUALS, finAccountId),
-                new EntityExpr("transactionDate", EntityOperator.LESS_THAN_EQUAL_TO, asOfDateTime),
-                new EntityConditionList(UtilMisc.toList(
-                        new EntityExpr("finAccountTransTypeId", EntityOperator.EQUALS, "DEPOSIT"),
-                        new EntityExpr("finAccountTransTypeId", EntityOperator.EQUALS, "ADJUSTMENT")),
+        EntityConditionList incrementConditions = EntityCondition.makeCondition(UtilMisc.toList(
+                EntityCondition.makeCondition("finAccountId", EntityOperator.EQUALS, finAccountId),
+                EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN_EQUAL_TO, asOfDateTime),
+                EntityCondition.makeCondition(UtilMisc.toList(
+                        EntityCondition.makeCondition("finAccountTransTypeId", EntityOperator.EQUALS, "DEPOSIT"),
+                        EntityCondition.makeCondition("finAccountTransTypeId", EntityOperator.EQUALS, "ADJUSTMENT")),
                     EntityOperator.OR)),
                 EntityOperator.AND);
         List transSums = delegator.findList("FinAccountTransSum", incrementConditions, UtilMisc.toSet("amount"), null, null, false);
         incrementTotal = addFirstEntryAmount(incrementTotal, transSums, "amount", (decimals+1), rounding);
 
         // now find sum of all transactions with decrease the value
-        EntityConditionList decrementConditions = new EntityConditionList(UtilMisc.toList(
-                new EntityExpr("finAccountId", EntityOperator.EQUALS, finAccountId),
-                new EntityExpr("transactionDate", EntityOperator.LESS_THAN_EQUAL_TO, asOfDateTime),
-                new EntityExpr("currencyUomId", EntityOperator.EQUALS, currencyUomId),
-                new EntityExpr("finAccountTransTypeId", EntityOperator.EQUALS, "WITHDRAWAL")),
+        EntityConditionList decrementConditions = EntityCondition.makeCondition(UtilMisc.toList(
+                EntityCondition.makeCondition("finAccountId", EntityOperator.EQUALS, finAccountId),
+                EntityCondition.makeCondition("transactionDate", EntityOperator.LESS_THAN_EQUAL_TO, asOfDateTime),
+                EntityCondition.makeCondition("currencyUomId", EntityOperator.EQUALS, currencyUomId),
+                EntityCondition.makeCondition("finAccountTransTypeId", EntityOperator.EQUALS, "WITHDRAWAL")),
             EntityOperator.AND);
         transSums = delegator.findList("FinAccountTransSum", decrementConditions, UtilMisc.toSet("amount"), null, null, false);
         decrementTotal = addFirstEntryAmount(decrementTotal, transSums, "amount", (decimals+1), rounding);
@@ -223,9 +227,9 @@
         BigDecimal netBalance = getBalance(finAccountId, asOfDateTime, delegator);
          
         // find sum of all authorizations which are not expired and which were authorized before as of time
-        EntityConditionList authorizationConditions = new EntityConditionList(UtilMisc.toList(
-                new EntityExpr("finAccountId", EntityOperator.EQUALS, finAccountId),
-                new EntityExpr("authorizationDate", EntityOperator.LESS_THAN_EQUAL_TO, asOfDateTime),
+        EntityConditionList authorizationConditions = EntityCondition.makeCondition(UtilMisc.toList(
+                EntityCondition.makeCondition("finAccountId", EntityOperator.EQUALS, finAccountId),
+                EntityCondition.makeCondition("authorizationDate", EntityOperator.LESS_THAN_EQUAL_TO, asOfDateTime),
                 EntityUtil.getFilterByDateExpr(asOfDateTime)),
             EntityOperator.AND);
          

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java?rev=660843&r1=660842&r2=660843&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java Wed May 28 00:22:59 2008
@@ -213,30 +213,30 @@
         List allConditions = new ArrayList();
 
         if (facilityId != null) {
-            allConditions.add(new EntityExpr("originFacilityId", EntityOperator.EQUALS, facilityId));
+            allConditions.add(EntityCondition.makeCondition("originFacilityId", EntityOperator.EQUALS, facilityId));
         }
 
         List statusConditions = new ArrayList();
         for (Iterator iter = orderStatusState.keySet().iterator(); iter.hasNext(); ) {
             String status = (String) iter.next();
             if (!hasStatus(status)) continue;
-            statusConditions.add( new EntityExpr("statusId", EntityOperator.EQUALS, parameterToOrderStatusId.get(status)) );
+            statusConditions.add( EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, parameterToOrderStatusId.get(status)) );
         }
         List typeConditions = new ArrayList();
         for (Iterator iter = orderTypeState.keySet().iterator(); iter.hasNext(); ) {
             String type = (String) iter.next();
             if (!hasType(type)) continue;
-            typeConditions.add( new EntityExpr("orderTypeId", EntityOperator.EQUALS, parameterToOrderTypeId.get(type)) );
+            typeConditions.add( EntityCondition.makeCondition("orderTypeId", EntityOperator.EQUALS, parameterToOrderTypeId.get(type)) );
         }
                 
-        EntityCondition statusConditionsList = new EntityConditionList(statusConditions,  EntityOperator.OR);
-        EntityCondition typeConditionsList = new EntityConditionList(typeConditions, EntityOperator.OR);
+        EntityCondition statusConditionsList = EntityCondition.makeCondition(statusConditions,  EntityOperator.OR);
+        EntityCondition typeConditionsList = EntityCondition.makeCondition(typeConditions, EntityOperator.OR);
         if ((typeConditions.size() > 0) && (statusConditions.size() > 0)) {
             allConditions.add(statusConditionsList);
             allConditions.add(typeConditionsList);
         }
 
-        EntityCondition queryConditionsList = new EntityConditionList(allConditions, EntityOperator.AND);
+        EntityCondition queryConditionsList = EntityCondition.makeCondition(allConditions, EntityOperator.AND);
         EntityFindOptions options = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
         EntityListIterator iterator = delegator.find("OrderHeader", queryConditionsList, null, null, UtilMisc.toList("orderDate DESC"), options);