ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [18/23] incubator-ignite git commit: # Minor Schema Import: added missing code to snippet generator.
Date Mon, 16 Mar 2015 13:29:10 GMT
# Minor Schema Import: added missing code to snippet generator.


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

Branch: refs/heads/ignite-368
Commit: 6cbaab4c70c778a550218a9342b42ce4814fab6c
Parents: a05f2a1
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Mar 16 20:02:20 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Mar 16 20:02:20 2015 +0700

----------------------------------------------------------------------
 .../apache/ignite/schema/generator/SnippetGenerator.java  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6cbaab4c/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/SnippetGenerator.java
----------------------------------------------------------------------
diff --git a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/SnippetGenerator.java
b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/SnippetGenerator.java
index df7b3c5..084601a 100644
--- a/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/SnippetGenerator.java
+++ b/modules/schema-import/src/main/java/org/apache/ignite/schema/generator/SnippetGenerator.java
@@ -92,8 +92,6 @@ public class SnippetGenerator {
         src.add("ccfg.setReadThrough(true);");
         src.add("ccfg.setWriteThrough(true);");
         src.add("");
-        src.add("cfg.setCacheConfiguration(ccfg);");
-        src.add("");
         src.add("// Configure cache types. ");
         src.add("Collection<CacheTypeMetadata> meta = new ArrayList<>();");
         src.add("");
@@ -111,6 +109,9 @@ public class SnippetGenerator {
             src.add("type.setValueType(\"" +  pkg + "." + pojo.valueClassName() + "\");");
             src.add("");
 
+            src.add("meta.add(type);");
+            src.add("");
+
             src.add("// Key fields for " + tbl + ".");
             src.add((first ? "Collection<CacheTypeFieldMetadata> " : "") + "keys =
new ArrayList<>();");
             addFields(src, "keys", pojo.keyFields());
@@ -125,6 +126,11 @@ public class SnippetGenerator {
 
             first = false;
         }
+        src.add("");
+        src.add("ccfg.setTypeMetadata(meta);");
+
+        src.add("");
+        src.add("cfg.setCacheConfiguration(ccfg);");
 
         src.add("// Start Ignite node.");
         src.add("Ignition.start(cfg);");


Mime
View raw message