cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r703690 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/ProcedureTranslator.java
Date Sat, 11 Oct 2008 17:21:41 GMT
Author: aadamchik
Date: Sat Oct 11 10:21:41 2008
New Revision: 703690

URL: http://svn.apache.org/viewvc?rev=703690&view=rev
Log:
fixing stored procedure translator broken by an incorrect generics spec

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/ProcedureTranslator.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/ProcedureTranslator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/ProcedureTranslator.java?rev=703690&r1=703689&r2=703690&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/ProcedureTranslator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/ProcedureTranslator.java
Sat Oct 11 10:21:41 2008
@@ -22,7 +22,6 @@
 import java.sql.CallableStatement;
 import java.sql.PreparedStatement;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -59,7 +58,7 @@
     private static NotInParam OUT_PARAM = new NotInParam("[OUT]");
 
     protected List<ProcedureParameter> callParams;
-    protected List<NotInParam> values;
+    protected List<Object> values;
 
     /**
      * Creates an SQL String for the stored procedure call.
@@ -102,7 +101,7 @@
         long t1 = System.currentTimeMillis();
 
         this.callParams = getProcedure().getCallParameters();
-        this.values = new ArrayList<NotInParam>(callParams.size());
+        this.values = new ArrayList<Object>(callParams.size());
 
         initValues();
         String sqlStr = createSqlString();
@@ -111,10 +110,8 @@
             // need to convert OUT/VOID parameters to loggable strings
             long time = System.currentTimeMillis() - t1;
 
-            List loggableParameters = new ArrayList(values.size());
-            Iterator<NotInParam> it = values.iterator();
-            while (it.hasNext()) {
-                Object val = it.next();
+            List<Object> loggableParameters = new ArrayList<Object>(values.size());
+            for (Object val : values) {
                 if (val instanceof NotInParam) {
                     val = val.toString();
                 }
@@ -162,7 +159,7 @@
     }
 
     protected void initValues() {
-        Map<String, NotInParam> queryValues = (Map<String, NotInParam>) getProcedureQuery().getParameters();
+        Map<String, ?> queryValues = getProcedureQuery().getParameters();
 
         // match values with parameters in the correct order.
         // make an assumption that a missing value is NULL



Mime
View raw message