cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r604611 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/exp/ main/java/org/apache/cayenne/exp/parser/ main/java/org/apache/cayenne/query/ test/java/org/apache/cayenne/exp/
Date Sun, 16 Dec 2007 11:58:48 GMT
Author: aadamchik
Date: Sun Dec 16 03:58:47 2007
New Revision: 604611

URL: http://svn.apache.org/viewvc?rev=604611&view=rev
Log:
varargs , generics

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTDbPath.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/ProcedureQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionFactoryTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java?rev=604611&r1=604610&r2=604611&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/Expression.java
Sun Dec 16 03:58:47 2007
@@ -231,7 +231,7 @@
     /**
      * A shortcut for <code>expWithParams(params, true)</code>.
      */
-    public Expression expWithParameters(Map parameters) {
+    public Expression expWithParameters(Map<String, ?> parameters) {
         return expWithParameters(parameters, true);
     }
 
@@ -253,7 +253,9 @@
      * @return Expression resulting from the substitution of parameters with real values,
      *         or null if the whole expression was pruned, due to the missing parameters.
      */
-    public Expression expWithParameters(final Map parameters, final boolean pruneMissing)
{
+    public Expression expWithParameters(
+            final Map<String, ?> parameters,
+            final boolean pruneMissing) {
 
         // create transformer for named parameters
         Transformer transformer = new Transformer() {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java?rev=604611&r1=604610&r2=604611&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/ExpressionFactory.java
Sun Dec 16 03:58:47 2007
@@ -21,7 +21,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -62,7 +61,7 @@
  */
 public class ExpressionFactory {
 
-    private static Class[] typeLookup;
+    private static Class<?>[] typeLookup;
 
     static {
         // make sure all types are small integers, then we can use
@@ -128,7 +127,7 @@
         typeLookup[Expression.OBJ_PATH] = ASTObjPath.class;
         typeLookup[Expression.DB_PATH] = ASTDbPath.class;
         typeLookup[Expression.LIST] = ASTList.class;
-        
+
         typeLookup[Expression.TRUE] = ASTTrue.class;
         typeLookup[Expression.FALSE] = ASTFalse.class;
     }
@@ -165,7 +164,7 @@
      */
     protected static Object wrapPathOperand(Object op) {
         if (op instanceof Collection) {
-            return new ASTList((Collection) op);
+            return new ASTList((Collection<?>) op);
         }
         else if (op instanceof Object[]) {
             return new ASTList((Object[]) op);
@@ -179,16 +178,13 @@
      * Creates an expression that matches any of the key-values pairs in <code>map</code>.
      * <p>
      * For each pair <code>pairType</code> operator is used to build a binary
-     * expression. Key is considered to be a DB_PATH expression. Therefore all keys must
-     * be java.lang.String objects, or ClassCastException is thrown. OR is used to join
-     * pair binary expressions.
-     */
-    public static Expression matchAnyDbExp(Map map, int pairType) {
-        List pairs = new ArrayList();
-
-        Iterator it = map.entrySet().iterator();
-        while (it.hasNext()) {
-            Map.Entry entry = (Map.Entry) it.next();
+     * expression. Key is considered to be a DB_PATH expression. OR is used to join pair
+     * binary expressions.
+     */
+    public static Expression matchAnyDbExp(Map<String, ?> map, int pairType) {
+        List<Expression> pairs = new ArrayList<Expression>(map.size());
+
+        for (Map.Entry<String, ?> entry : map.entrySet()) {
             Expression exp = expressionOfType(pairType);
             exp.setOperand(0, new ASTDbPath(entry.getKey()));
             exp.setOperand(1, wrapPathOperand(entry.getValue()));
@@ -202,17 +198,13 @@
      * Creates an expression that matches all key-values pairs in <code>map</code>.
      * <p>
      * For each pair <code>pairType</code> operator is used to build a binary
-     * expression. Key is considered to be a DB_PATH expression. Therefore all keys must
-     * be java.lang.String objects, or ClassCastException is thrown. AND is used to join
-     * pair binary expressions.
-     */
-    public static Expression matchAllDbExp(Map map, int pairType) {
-        List pairs = new ArrayList();
-
-        Iterator it = map.entrySet().iterator();
-        while (it.hasNext()) {
-            Map.Entry entry = (Map.Entry) it.next();
+     * expression. Key is considered to be a DB_PATH expression. AND is used to join pair
+     * binary expressions.
+     */
+    public static Expression matchAllDbExp(Map<String, ?> map, int pairType) {
+        List<Expression> pairs = new ArrayList<Expression>(map.size());
 
+        for (Map.Entry<String, ?> entry : map.entrySet()) {
             Expression exp = expressionOfType(pairType);
             exp.setOperand(0, new ASTDbPath(entry.getKey()));
             exp.setOperand(1, wrapPathOperand(entry.getValue()));
@@ -227,16 +219,13 @@
      * <code>map</code>.
      * <p>
      * For each pair <code>pairType</code> operator is used to build a binary
-     * expression. Key is considered to be a OBJ_PATH expression. Therefore all keys must
-     * be java.lang.String objects, or ClassCastException is thrown. OR is used to join
-     * pair binary expressions.
-     */
-    public static Expression matchAnyExp(Map map, int pairType) {
-        List pairs = new ArrayList();
-
-        Iterator it = map.entrySet().iterator();
-        while (it.hasNext()) {
-            Map.Entry entry = (Map.Entry) it.next();
+     * expression. Key is considered to be a OBJ_PATH expression. OR is used to join pair
+     * binary expressions.
+     */
+    public static Expression matchAnyExp(Map<String, ?> map, int pairType) {
+        List<Expression> pairs = new ArrayList<Expression>(map.size());
+
+        for (Map.Entry<String, ?> entry : map.entrySet()) {
 
             Expression exp = expressionOfType(pairType);
             exp.setOperand(0, new ASTObjPath(entry.getKey()));
@@ -251,16 +240,13 @@
      * Creates an expression that matches all key-values pairs in <code>map</code>.
      * <p>
      * For each pair <code>pairType</code> operator is used to build a binary
-     * expression. Key is considered to be a OBJ_PATH expression. Therefore all keys must
-     * be java.lang.String objects, or ClassCastException is thrown. AND is used to join
-     * pair binary expressions.
-     */
-    public static Expression matchAllExp(Map map, int pairType) {
-        List pairs = new ArrayList();
-
-        Iterator it = map.entrySet().iterator();
-        while (it.hasNext()) {
-            Map.Entry entry = (Map.Entry) it.next();
+     * expression. Key is considered to be a OBJ_PATH expression. AND is used to join pair
+     * binary expressions.
+     */
+    public static Expression matchAllExp(Map<String, ?> map, int pairType) {
+        List<Expression> pairs = new ArrayList<Expression>(map.size());
+
+        for (Map.Entry<String, ?> entry : map.entrySet()) {
 
             Expression exp = expressionOfType(pairType);
             exp.setOperand(0, new ASTObjPath(entry.getKey()));
@@ -305,7 +291,7 @@
     public static Expression lessExp(String pathSpec, Object value) {
         return new ASTLess(new ASTObjPath(pathSpec), value);
     }
-    
+
     /**
      * A convenience method to create an DB_PATH "less than" expression.
      * 
@@ -321,7 +307,7 @@
     public static Expression lessOrEqualExp(String pathSpec, Object value) {
         return new ASTLessOrEqual(new ASTObjPath(pathSpec), value);
     }
-    
+
     /**
      * A convenience method to create an DB_PATH "less than or equal to" expression.
      * 
@@ -337,7 +323,7 @@
     public static Expression greaterExp(String pathSpec, Object value) {
         return new ASTGreater(new ASTObjPath(pathSpec), value);
     }
-    
+
     /**
      * A convenience method to create an DB_PATH "greater than" expression.
      * 
@@ -353,7 +339,7 @@
     public static Expression greaterOrEqualExp(String pathSpec, Object value) {
         return new ASTGreaterOrEqual(new ASTObjPath(pathSpec), value);
     }
-    
+
     /**
      * A convenience method to create an DB_PATH "greater than or equal to" expression.
      * 
@@ -367,7 +353,7 @@
      * A convenience shortcut for building IN expression. Return ASTFalse for empty
      * collection.
      */
-    public static Expression inExp(String pathSpec, Object[] values) {
+    public static Expression inExp(String pathSpec, Object... values) {
         if (values.length == 0) {
             return new ASTFalse();
         }
@@ -378,7 +364,7 @@
      * A convenience shortcut for building IN DB expression. Return ASTFalse for empty
      * collection.
      */
-    public static Expression inDbExp(String pathSpec, Object[] values) {
+    public static Expression inDbExp(String pathSpec, Object... values) {
         if (values.length == 0) {
             return new ASTFalse();
         }
@@ -389,7 +375,7 @@
      * A convenience shortcut for building IN expression. Return ASTFalse for empty
      * collection.
      */
-    public static Expression inExp(String pathSpec, Collection values) {
+    public static Expression inExp(String pathSpec, Collection<?> values) {
         if (values.isEmpty()) {
             return new ASTFalse();
         }
@@ -400,7 +386,7 @@
      * A convenience shortcut for building IN DB expression. Return ASTFalse for empty
      * collection.
      */
-    public static Expression inDbExp(String pathSpec, Collection values) {
+    public static Expression inDbExp(String pathSpec, Collection<?> values) {
         if (values.isEmpty()) {
             return new ASTFalse();
         }
@@ -411,47 +397,46 @@
      * A convenience shortcut for building NOT_IN expression. Return ASTTrue for empty
      * collection.
      */
-    public static Expression notInExp(String pathSpec, Collection values) {
+    public static Expression notInExp(String pathSpec, Collection<?> values) {
         if (values.isEmpty()) {
             return new ASTTrue();
         }
         return new ASTNotIn(new ASTObjPath(pathSpec), new ASTList(values));
     }
-    
+
     /**
      * A convenience shortcut for building NOT_IN expression. Return ASTTrue for empty
      * collection.
      * 
      * @since 3.0
      */
-    public static Expression notInDbExp(String pathSpec, Collection values) {
+    public static Expression notInDbExp(String pathSpec, Collection<?> values) {
         if (values.isEmpty()) {
             return new ASTTrue();
         }
         return new ASTNotIn(new ASTDbPath(pathSpec), new ASTList(values));
     }
 
-
     /**
      * A convenience shortcut for building NOT_IN expression. Return ASTTrue for empty
      * collection.
      * 
      * @since 1.0.6
      */
-    public static Expression notInExp(String pathSpec, Object[] values) {
+    public static Expression notInExp(String pathSpec, Object... values) {
         if (values.length == 0) {
             return new ASTTrue();
         }
         return new ASTNotIn(new ASTObjPath(pathSpec), new ASTList(values));
     }
-    
+
     /**
      * A convenience shortcut for building NOT_IN expression. Return ASTTrue for empty
      * collection.
      * 
      * @since 3.0
      */
-    public static Expression notInDbExp(String pathSpec, Object[] values) {
+    public static Expression notInDbExp(String pathSpec, Object... values) {
         if (values.length == 0) {
             return new ASTTrue();
         }
@@ -464,7 +449,7 @@
     public static Expression betweenExp(String pathSpec, Object value1, Object value2) {
         return new ASTBetween(new ASTObjPath(pathSpec), value1, value2);
     }
-    
+
     /**
      * A convenience shortcut for building BETWEEN expressions.
      * 
@@ -480,7 +465,7 @@
     public static Expression notBetweenExp(String pathSpec, Object value1, Object value2)
{
         return new ASTNotBetween(new ASTObjPath(pathSpec), value1, value2);
     }
-    
+
     /**
      * A convenience shortcut for building NOT_BETWEEN expressions.
      * 
@@ -496,7 +481,7 @@
     public static Expression likeExp(String pathSpec, Object value) {
         return new ASTLike(new ASTObjPath(pathSpec), value);
     }
-    
+
     /**
      * A convenience shortcut for building LIKE DB_PATH expression.
      * 
@@ -512,7 +497,7 @@
     public static Expression notLikeExp(String pathSpec, Object value) {
         return new ASTNotLike(new ASTObjPath(pathSpec), value);
     }
-    
+
     /**
      * A convenience shortcut for building NOT_LIKE expression.
      * 
@@ -528,7 +513,7 @@
     public static Expression likeIgnoreCaseExp(String pathSpec, Object value) {
         return new ASTLikeIgnoreCase(new ASTObjPath(pathSpec), value);
     }
-    
+
     /**
      * A convenience shortcut for building LIKE_IGNORE_CASE expression.
      * 
@@ -544,7 +529,7 @@
     public static Expression notLikeIgnoreCaseExp(String pathSpec, Object value) {
         return new ASTNotLikeIgnoreCase(new ASTObjPath(pathSpec), value);
     }
-    
+
     /**
      * A convenience shortcut for building NOT_LIKE_IGNORE_CASE expression.
      * 
@@ -582,12 +567,12 @@
      * any of the expressions.
      * </p>
      */
-    public static Expression joinExp(int type, List expressions) {
+    public static Expression joinExp(int type, List<Expression> expressions) {
         int len = expressions.size();
         if (len == 0)
             return null;
 
-        Expression currentExp = (Expression) expressions.get(0);
+        Expression currentExp = expressions.get(0);
         if (len == 1) {
             return currentExp;
         }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTDbPath.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTDbPath.java?rev=604611&r1=604610&r2=604611&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTDbPath.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/exp/parser/ASTDbPath.java
Sun Dec 16 03:58:47 2007
@@ -34,6 +34,7 @@
  * @author Andrus Adamchik
  */
 public class ASTDbPath extends ASTPath {
+
     ASTDbPath(int id) {
         super(id);
     }
@@ -54,13 +55,13 @@
             return evaluateEntityNode((Entity) o);
         }
 
-        Map map = toMap(o);
+        Map<?, ?> map = toMap(o);
         return (map != null) ? map.get(path) : null;
     }
 
-    protected Map toMap(Object o) {
+    protected Map<?, ?> toMap(Object o) {
         if (o instanceof Map) {
-            return (Map) o;
+            return (Map<?, ?>) o;
         }
         else if (o instanceof ObjectId) {
             return ((ObjectId) o).getIdSnapshot();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/ProcedureQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/ProcedureQuery.java?rev=604611&r1=604610&r2=604611&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/ProcedureQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/ProcedureQuery.java
Sun Dec 16 03:58:47 2007
@@ -27,7 +27,6 @@
 import java.util.Map;
 
 import org.apache.cayenne.access.jdbc.ColumnDescriptor;
-import org.apache.cayenne.access.jdbc.RowDescriptor;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.map.Procedure;
 import org.apache.cayenne.map.QueryBuilder;
@@ -68,9 +67,9 @@
     /**
      * @since 1.2
      */
-    protected Class resultClass;
+    protected Class<?> resultClass;
 
-    protected Map parameters = new HashMap();
+    protected Map<String, Object> parameters = new HashMap<String, Object>();
 
     ProcedureQueryMetadata metaData = new ProcedureQueryMetadata();
 
@@ -79,7 +78,7 @@
     /**
      * @since 1.2
      */
-    protected List resultDescriptors;
+    protected List<ColumnDescriptor[]> resultDescriptors;
 
     /**
      * Creates an empty procedure query.
@@ -156,8 +155,8 @@
     }
 
     /**
-     * Returns a List of #{@link RowDescriptor} objects describing query ResultSets in
-     * the order they are returned by the stored procedure.
+     * Returns a List of descriptors for query ResultSets in the order they are returned
+     * by the stored procedure.
      * <p>
      * <i>Note that if a procedure returns ResultSet in an OUT parameter, it is returned
      * prior to any other result sets (though in practice database engines usually support
@@ -166,7 +165,7 @@
      * 
      * @since 1.2
      */
-    public List getResultDescriptors() {
+    public List<ColumnDescriptor[]> getResultDescriptors() {
         return resultDescriptors != null ? resultDescriptors : Collections.EMPTY_LIST;
     }
 
@@ -179,7 +178,7 @@
      */
     public synchronized void addResultDescriptor(ColumnDescriptor[] descriptor) {
         if (resultDescriptors == null) {
-            resultDescriptors = new ArrayList(2);
+            resultDescriptors = new ArrayList<ColumnDescriptor[]>(2);
         }
 
         resultDescriptors.add(descriptor);
@@ -268,7 +267,7 @@
      * 
      * @since 1.1
      */
-    public Query createQuery(Map parameters) {
+    public Query createQuery(Map<String, ?> parameters) {
         // create a query replica
         ProcedureQuery query = new ProcedureQuery();
 
@@ -293,7 +292,7 @@
     public void setCachePolicy(String policy) {
         this.metaData.setCachePolicy(policy);
     }
-    
+
     /**
      * @since 3.0
      */
@@ -369,7 +368,7 @@
      * 
      * @since 1.1
      */
-    public Map getParameters() {
+    public Map<String, ?> getParameters() {
         return parameters;
     }
 
@@ -378,7 +377,7 @@
      * 
      * @since 1.1
      */
-    public synchronized void setParameters(Map parameters) {
+    public synchronized void setParameters(Map<String, ?> parameters) {
         this.parameters.clear();
 
         if (parameters != null) {
@@ -426,7 +425,7 @@
      * 
      * @since 1.2
      */
-    public void addPrefetches(Collection prefetches) {
+    public void addPrefetches(Collection<String> prefetches) {
         metaData.addPrefetches(prefetches, PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java?rev=604611&r1=604610&r2=604611&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/QueryMetadataWrapper.java
Sun Dec 16 03:58:47 2007
@@ -40,7 +40,7 @@
     static final String CACHE_KEY_PROPERTY = "QueryMetadataWrapper.CacheKey";
 
     QueryMetadata info;
-    Map overrides;
+    Map<String, Object> overrides;
 
     public QueryMetadataWrapper(QueryMetadata info) {
         this.info = info;
@@ -52,7 +52,7 @@
      */
     void override(String key, Object value) {
         if (overrides == null) {
-            overrides = new HashMap();
+            overrides = new HashMap<String, Object>();
         }
 
         overrides.put(key, value);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java?rev=604611&r1=604610&r2=604611&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
Sun Dec 16 03:58:47 2007
@@ -190,7 +190,7 @@
      * 
      * @since 1.1
      */
-    public void initWithProperties(Map<String,?> properties) {
+    public void initWithProperties(Map<String, ?> properties) {
 
         // must init defaults even if properties are empty
         if (properties == null) {
@@ -282,7 +282,7 @@
      * A shortcut for {@link #queryWithParameters(Map, boolean)}that prunes parts of
      * qualifier that have no parameter value set.
      */
-    public SelectQuery queryWithParameters(Map<String,?> parameters) {
+    public SelectQuery queryWithParameters(Map<String, ?> parameters) {
         return queryWithParameters(parameters, true);
     }
 
@@ -293,7 +293,7 @@
      * @see org.apache.cayenne.exp.Expression#expWithParameters(java.util.Map, boolean)
      *      parameter substitution.
      */
-    public SelectQuery queryWithParameters(Map<?,?> parameters, boolean pruneMissing)
{
+    public SelectQuery queryWithParameters(Map<String, ?> parameters, boolean pruneMissing)
{
         // create a query replica
         SelectQuery query = new SelectQuery();
         query.setDistinct(distinct);
@@ -338,7 +338,7 @@
      * 
      * @since 1.1
      */
-    public Query createQuery(Map<String,?> parameters) {
+    public Query createQuery(Map<String, ?> parameters) {
         return queryWithParameters(parameters);
     }
 
@@ -551,8 +551,8 @@
     /**
      * @since 3.0
      */
-    public void setCacheGroups(String[] cachGroups) {
-        this.selectInfo.setCacheGroups(cachGroups);
+    public void setCacheGroups(String... cacheGroups) {
+        this.selectInfo.setCacheGroups(cacheGroups);
     }
 
     /**

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionFactoryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionFactoryTest.java?rev=604611&r1=604610&r2=604611&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionFactoryTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/exp/ExpressionFactoryTest.java
Sun Dec 16 03:58:47 2007
@@ -146,7 +146,7 @@
         Object[] v = new Object[] {
                 "a", "b"
         };
-        Expression exp = ExpressionFactory.inExp("abc", v);
+        Expression exp = ExpressionFactory.inExp("abc", "a", "b");
         assertEquals(Expression.IN, exp.getType());
     }
 



Mime
View raw message