You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/14 22:59:26 UTC

svn commit: r1338402 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

Author: doogie
Date: Mon May 14 20:59:26 2012
New Revision: 1338402

URL: http://svn.apache.org/viewvc?rev=1338402&view=rev
Log:
OPTIMIZE: One findByAnd call was calling another findByAnd, instead of
calling findList directly.  This change should speed it up(just
slightly).

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1338402&r1=1338401&r2=1338402&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Mon May 14 20:59:26 2012
@@ -1687,7 +1687,8 @@ public class GenericDelegator implements
      * @see org.ofbiz.entity.Delegator#findByAnd(java.lang.String, java.lang.Object)
      */
     public List<GenericValue> findByAnd(String entityName, Object... fields) throws GenericEntityException {
-        return findByAnd(entityName, UtilMisc.<String, Object>toMap(fields));
+        EntityCondition ecl = EntityCondition.makeCondition(UtilMisc.<String, Object>toMap(fields));
+        return this.findList(entityName, ecl, null, null, null, false);
     }
 
     /* (non-Javadoc)