ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [13/50] [abbrv] incubator-ignite git commit: # IGNITE-32: Fixed code logic.
Date Thu, 05 Feb 2015 13:42:39 GMT
# IGNITE-32: Fixed code logic.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7b9e7d16
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7b9e7d16
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7b9e7d16

Branch: refs/heads/ignite-sql-tests
Commit: 7b9e7d16fd5ec3b89d10e251bd359309e14c17eb
Parents: ffd877d
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Thu Feb 5 13:18:05 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Thu Feb 5 13:18:05 2015 +0700

----------------------------------------------------------------------
 .../ignite/cache/store/jdbc/JdbcCacheStore.java | 23 +++++++++++++-------
 1 file changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7b9e7d16/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
index 255b895..a4392f1 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/JdbcCacheStore.java
@@ -330,21 +330,28 @@ public abstract class JdbcCacheStore<K, V> extends CacheStore<K,
V> implements L
      * @throws SQLException If a database access error occurs or this method is called.
      */
     protected Object getColumnValue(ResultSet rs, int colIdx, Class<?> type) throws
SQLException {
-        if (type == boolean.class)
-            return rs.getBoolean(colIdx);
         if (type == int.class)
             return rs.getInt(colIdx);
-        else if (type == long.class)
+
+        if (type == long.class)
             return rs.getLong(colIdx);
-        else if (type == double.class)
+
+        if (type == double.class)
             return rs.getDouble(colIdx);
-        else if (type == byte.class)
+
+        if (type == boolean.class)
+            return rs.getBoolean(colIdx);
+
+        if (type == byte.class)
             return rs.getByte(colIdx);
-        else if (type == short.class)
+
+        if (type == short.class)
             return rs.getShort(colIdx);
-        else if (type == float.class)
+
+        if (type == float.class)
             return rs.getFloat(colIdx);
-        else if (type == Integer.class || type == Long.class || type == Double.class ||
+
+        if (type == Integer.class || type == Long.class || type == Double.class ||
             type == Byte.class || type == Short.class ||  type == Float.class) {
             Object val = rs.getObject(colIdx);
 


Mime
View raw message