You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2011/06/21 22:07:10 UTC
svn commit: r1138157 -
/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java
Author: tfischer
Date: Tue Jun 21 20:07:10 2011
New Revision: 1138157
URL: http://svn.apache.org/viewvc?rev=1138157&view=rev
Log:
generalize addIn and addNotIn parameter from List to Collection
Modified:
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java
Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java?rev=1138157&r1=1138156&r2=1138157&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java (original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/Criteria.java Tue Jun 21 20:07:10 2011
@@ -19,9 +19,6 @@ package org.apache.torque.util;
* under the License.
*/
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -1429,24 +1426,24 @@ public class Criteria implements Seriali
}
/**
- * Adds an 'IN' clause with the criteria supplied as a List.
+ * Adds an 'IN' clause with the criteria supplied as a Collection.
* For example:
*
* <p>
* FOO.NAME IN ('FOO', 'BAR', 'ZOW')
* <p>
*
- * where 'values' contains three objects that evaluate to the
- * respective strings above when .toString() is called.
+ * where 'values' contains three Strings "FOO", "BAR" and "ZOW".
*
* If a criterion for the requested column already exists, it is
* replaced.
*
* @param column The column to run the comparison on
- * @param values A List with the allowed values.
+ * @param values A Collection with the allowed values.
+ *
* @return A modified Criteria object.
*/
- public Criteria addIn(String column, List<?> values)
+ public Criteria addIn(String column, Collection<?> values)
{
add(column, (Object) values, Criteria.IN);
return this;
@@ -1500,24 +1497,24 @@ public class Criteria implements Seriali
}
/**
- * Adds a 'NOT IN' clause with the criteria supplied as a List.
+ * Adds a 'NOT IN' clause with the criteria supplied as a Collection.
* For example:
*
* <p>
* FOO.NAME NOT IN ('FOO', 'BAR', 'ZOW')
* <p>
*
- * where 'values' contains three objects that evaluate to the
- * respective strings above when .toString() is called.
+ * where 'values' contains three Strings "FOO", "BAR" and "ZOW".
*
* If a criterion for the requested column already exists, it is
* replaced.
*
* @param column The column to run the comparison on
- * @param values A List with the disallowed values.
+ * @param values A Collection with the disallowed values.
+ *
* @return A modified Criteria object.
*/
- public Criteria addNotIn(String column, List<?> values)
+ public Criteria addNotIn(String column, Collection<?> values)
{
add(column, (Object) values, Criteria.NOT_IN);
return this;
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org