db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1627686 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeerImpl.java
Date Fri, 26 Sep 2014 01:01:53 GMT
Author: tfischer
Date: Fri Sep 26 01:01:53 2014
New Revision: 1627686

URL: http://svn.apache.org/r1627686
Log:
TORQUE-330 fix prepared statement replacement type handling for postgresql

Modified:
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeerImpl.java

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeerImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeerImpl.java?rev=1627686&r1=1627685&r2=1627686&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeerImpl.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/util/BasePeerImpl.java
Fri Sep 26 01:01:53 2014
@@ -1848,6 +1848,26 @@ public class BasePeerImpl<T> implements 
                 statement.setBoolean(i, ((Boolean) param).booleanValue());
                 result.add(param);
             }
+            else if (param instanceof Short)
+            {
+                statement.setShort(i, ((Short) param).shortValue());
+                result.add(param);
+            }
+            else if (param instanceof Byte)
+            {
+                statement.setByte(i, ((Byte) param).byteValue());
+                result.add(param);
+            }
+            else if (param instanceof Float)
+            {
+                statement.setFloat(i, ((Float) param).floatValue());
+                result.add(param);
+            }
+            else if (param instanceof Double)
+            {
+                statement.setDouble(i, ((Double) param).doubleValue());
+                result.add(param);
+            }
             else
             {
                 statement.setString(i, param.toString());



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message