openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r448757 - in /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps: Abs.java Param.java
Date Fri, 22 Sep 2006 00:52:08 GMT
Author: awhite
Date: Thu Sep 21 17:52:08 2006
New Revision: 448757

URL: http://svn.apache.org/viewvc?view=rev&rev=448757
Log:
fix JDBC Abs query function's return type.


Modified:
    incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Abs.java
    incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Abs.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Abs.java?view=diff&rev=448757&r1=448756&r2=448757
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Abs.java
(original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Abs.java
Thu Sep 21 17:52:08 2006
@@ -34,8 +34,14 @@
     }
 
     protected Class getType(Class c) {
-        if (c == Long.class || c == long.class)
-            return long.class;
+        Class wrap = Filters.wrap(c);
+        if (wrap == Integer.class
+            || wrap == Float.class
+            || wrap == Double.class
+            || wrap == Long.class
+            || wrap == BigDecimal.class
+            || wrap == BigInteger.class)
+            return Filters.unwrap(c);
         return int.class;
     }
 

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java?view=diff&rev=448757&r1=448756&r2=448757
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java
(original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java
Thu Sep 21 17:52:08 2006
@@ -62,8 +62,7 @@
 
     public void setImplicitType(Class type) {
         _type = type;
-        _container = (getMetaData() == null ||
-            !ImplHelper.isManagedType(type))
+        _container = (getMetaData() == null || !ImplHelper.isManagedType(type))
             && (Collection.class.isAssignableFrom(type)
             || Map.class.isAssignableFrom(type));
     }



Mime
View raw message