You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2014/10/10 22:30:13 UTC

svn commit: r1630978 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java

Author: lektran
Date: Fri Oct 10 20:30:13 2014
New Revision: 1630978

URL: http://svn.apache.org/r1630978
Log:
Add where(EntityCondition...) to EntityQuery

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java?rev=1630978&r1=1630977&r2=1630978&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java Fri Oct 10 20:30:13 2014
@@ -160,6 +160,17 @@ public class EntityQuery {
         return this;
     }
 
+    /** Set a series of EntityConditions to be ANDed together as the WHERE clause for the query
+     * 
+     * NOTE: Each successive call to any of the where(...) methods will replace the currently set condition for the query.
+     * @param fieldMap - A series of EntityConditions to be ANDed together as the where clause for the query
+     * @return this EntityQuery object, to enable chaining
+     */
+    public EntityQuery where(EntityCondition...entityCondition) {
+        this.whereEntityCondition = EntityCondition.makeCondition(Arrays.asList(entityCondition));
+        return this;
+    }
+
     /** Set a list of EntityCondition objects to be ANDed together as the WHERE clause for the query
      * 
      * NOTE: Each successive call to any of the where(...) methods will replace the currently set condition for the query.