polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject polygene-java git commit: Fixing SQL assemblers in generator.
Date Thu, 13 Apr 2017 06:38:36 GMT
Repository: polygene-java
Updated Branches:
  refs/heads/develop 3610b58a8 -> 58fcd8fea


Fixing SQL assemblers in generator.


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/58fcd8fe
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/58fcd8fe
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/58fcd8fe

Branch: refs/heads/develop
Commit: 58fcd8fea590a4447cc3689e84651e8d6c4722db
Parents: 3610b58
Author: niclas <niclas@spicter.com>
Authored: Thu Apr 13 14:37:10 2017 +0800
Committer: niclas <niclas@spicter.com>
Committed: Thu Apr 13 14:37:10 2017 +0800

----------------------------------------------------------------------
 tools/generator-polygene/app/index.js             | 18 +++++++++++++++++-
 .../StorageModule/bootstrap.tmpl                  |  2 +-
 .../app/templates/buildtool/gradle-bootstrap.tmpl |  2 +-
 tools/generator-polygene/test/generator_test.js   |  2 +-
 4 files changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58fcd8fe/tools/generator-polygene/app/index.js
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/index.js b/tools/generator-polygene/app/index.js
index 93b753f..3c2d323 100644
--- a/tools/generator-polygene/app/index.js
+++ b/tools/generator-polygene/app/index.js
@@ -117,7 +117,7 @@ module.exports = generators.Base.extend(
                                 'Preferences',
                                 'Redis',
                                 'Riak',
-                                'PostgresSQL',
+                                'PostgreSQL',
                                 'SQLite'
                             ],
                             message: 'Which entity store do you want to use?',
@@ -197,6 +197,22 @@ module.exports = generators.Base.extend(
                         this.log('Serialization:', answers.serialization);
                         this.log('Features:', answers.features);
                         polygene = answers;
+                        polygene.entitystoremodule = polygene.entitystore.toLowerCase();
+                        if (polygene.entitystore === "DerbySQL") {
+                            polygene.entitystoremodule = "sql";
+                        }
+                        if (polygene.entitystore === "H2SQL") {
+                            polygene.entitystoremodule = "sql";
+                        }
+                        if (polygene.entitystore === "MySQL") {
+                            polygene.entitystoremodule = "sql";
+                        }
+                        if (polygene.entitystore === "PostgreSQL") {
+                            polygene.entitystoremodule = "sql";
+                        }
+                        if (polygene.entitystore === "SQLite") {
+                            polygene.entitystoremodule = "sql";
+                        }
                     }.bind(this)
                 );
             }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58fcd8fe/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
index 5cde992..1583636 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
@@ -24,7 +24,7 @@ import org.apache.polygene.bootstrap.AssemblyException;
 import org.apache.polygene.bootstrap.LayerAssembly;
 import org.apache.polygene.bootstrap.ModuleAssembly;
 import org.apache.polygene.bootstrap.layered.ModuleAssembler;
-import org.apache.polygene.entitystore.<%- polygene.entitystore.toLowerCase() %>.assembly.<%-
polygene.entitystore %>EntityStoreAssembler;
+import org.apache.polygene.entitystore.<%- polygene.entitystoremodule %>.assembly.<%-
polygene.entitystore %>EntityStoreAssembler;
 
 public class <%- polygene.entitystore %>StorageModule
     implements ModuleAssembler

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58fcd8fe/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl b/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
index 4c33c19..0d8dab2 100644
--- a/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/buildtool/gradle-bootstrap.tmpl
@@ -29,7 +29,7 @@ dependencies {
 <% if( polygene.applicationtype === 'Rest API' ) { %>
   compile "org.apache.polygene.libraries:org.apache.polygene.library.restlet:$polygeneVersion"
 <% } %>
-  compile "org.apache.polygene.extensions:org.apache.polygene.extension.entitystore-<%=
polygene.entitystore.toLowerCase() %>:$polygeneVersion"
+  compile "org.apache.polygene.extensions:org.apache.polygene.extension.entitystore-<%=
polygene.entitystoremodule.toLowerCase() %>:$polygeneVersion"
   compile "org.apache.polygene.extensions:org.apache.polygene.extension.indexing-<%= polygene.indexing.toLowerCase()
%>:$polygeneVersion"
   compile "org.apache.polygene.extensions:org.apache.polygene.extension.serialization-<%=
polygene.serialization.toLowerCase() %>:$polygeneVersion"
 

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58fcd8fe/tools/generator-polygene/test/generator_test.js
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/test/generator_test.js b/tools/generator-polygene/test/generator_test.js
index bc556f2..792c7d1 100644
--- a/tools/generator-polygene/test/generator_test.js
+++ b/tools/generator-polygene/test/generator_test.js
@@ -28,7 +28,7 @@ var entityStores = [
     'Preferences',
     'Redis',
     'Riak',
-    'PostgresSQL',
+    'PostgreSQL',
     'SQLite',
     'Memory'   // Somehow the last EntityStore is used in subsequent test arrays. Pick the
fastest.
 ];


Mime
View raw message