ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/46] ignite git commit: IGNITE-1408: Fixed POJO code generation: duplicate asc/desc fields. Fixed SQLXML JDBC type mapping to correct java type: String.
Date Tue, 15 Sep 2015 06:00:40 GMT
IGNITE-1408: Fixed POJO code generation: duplicate asc/desc fields. Fixed SQLXML JDBC type
mapping to correct java type: String.


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

Branch: refs/heads/master
Commit: d26f74662486516d72cfa704e70abc37e11c0123
Parents: b8be85d
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Fri Sep 11 15:44:11 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Sep 11 15:44:11 2015 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/schema/generator/CodeGenerator.java     | 4 ++--
 .../java/org/apache/ignite/schema/model/PojoDescriptor.java   | 6 ++++--
 .../ignite/schema/parser/dialect/OracleMetadataDialect.java   | 7 +++++--
 3 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d26f7466/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
index a278a56..f1119cf 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/CodeGenerator.java
@@ -571,7 +571,7 @@ public class CodeGenerator {
     private static boolean addQueryFields(Collection<String> src, Collection<PojoField>
fields, String varName,
         String mtdName, String comment, boolean first) {
         if (fields.isEmpty())
-            return true;
+            return first;
 
         add2(src, comment);
         add2(src, (first ? "Map<String, Class<?>> " : "") + varName + " = new
LinkedHashMap<>();");
@@ -739,4 +739,4 @@ public class CodeGenerator {
 
         write(src, cacheCfg);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d26f7466/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
index c092c50..d84643b 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/model/PojoDescriptor.java
@@ -56,6 +56,7 @@ import static java.sql.Types.NUMERIC;
 import static java.sql.Types.NVARCHAR;
 import static java.sql.Types.REAL;
 import static java.sql.Types.SMALLINT;
+import static java.sql.Types.SQLXML;
 import static java.sql.Types.TIME;
 import static java.sql.Types.TIMESTAMP;
 import static java.sql.Types.TINYINT;
@@ -529,6 +530,7 @@ public class PojoDescriptor {
             case LONGNVARCHAR:
             case CLOB:
             case NCLOB:
+            case SQLXML:
                 return String.class;
 
             case DATE:
@@ -541,9 +543,9 @@ public class PojoDescriptor {
                 return java.sql.Timestamp.class;
 
             // BINARY, VARBINARY, LONGVARBINARY, ARRAY, BLOB, NULL, DATALINK
-            // OTHER, JAVA_OBJECT, DISTINCT, STRUCT, REF, ROWID, SQLXML
+            // OTHER, JAVA_OBJECT, DISTINCT, STRUCT, REF, ROWID
             default:
                 return Object.class;
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/d26f7466/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
index 2d4cf24..cf7e979 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/parser/dialect/OracleMetadataDialect.java
@@ -48,6 +48,7 @@ import static java.sql.Types.LONGVARCHAR;
 import static java.sql.Types.NUMERIC;
 import static java.sql.Types.OTHER;
 import static java.sql.Types.SMALLINT;
+import static java.sql.Types.SQLXML;
 import static java.sql.Types.TIMESTAMP;
 import static java.sql.Types.TINYINT;
 import static java.sql.Types.VARCHAR;
@@ -212,8 +213,10 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
 
                 case "CLOB":
                 case "NCLOB":
-                case "XMLTYPE":
                     return CLOB;
+
+                case "XMLTYPE":
+                    return SQLXML;
             }
         }
 
@@ -352,4 +355,4 @@ public class OracleMetadataDialect extends DatabaseMetadataDialect {
 
         return tbls;
     }
-}
\ No newline at end of file
+}


Mime
View raw message