polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [9/9] polygene-java git commit: Added EntityStore configuration properties files. Added Datasource files. Modified some default values in various entitystores.
Date Sat, 27 May 2017 02:12:04 GMT
Added EntityStore configuration properties files. Added Datasource files. Modified some default
values in various entitystores.

Signed-off-by: niclas <niclas@hedhman.org>


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

Branch: refs/heads/yeoman-work
Commit: 5820223091f16f8067dc002bcfcd5fa2400b8687
Parents: 32b29f9
Author: niclas <niclas@hedhman.org>
Authored: Sat May 27 10:10:19 2017 +0800
Committer: niclas <niclas@hedhman.org>
Committed: Sat May 27 10:10:19 2017 +0800

----------------------------------------------------------------------
 .../cassandra/CassandraEntityStoreTest.java     |  4 +-
 .../HazelcastEntityStoreConfiguration.java      | 17 ++++--
 .../entitystore/jclouds/JCloudsS3Test.java      |  4 +-
 .../LevelDBEntityStoreConfiguration.java        |  3 ++
 .../leveldb/LevelDBEntityStoreMixin.java        | 15 ++----
 .../mongodb/MongoDBEntityStoreMixin.java        |  2 +-
 .../StorageModule/bootstrap.tmpl                | 20 ++++++-
 .../InfrastructureLayer/StorageModule/module.js | 19 +++++++
 .../storage/ds-derbysql.properties              | 24 +++++++++
 .../StorageModule/storage/ds-h2sql.properties   | 24 +++++++++
 .../StorageModule/storage/ds-mysql.properties   | 24 +++++++++
 .../storage/ds-postgresql.properties            | 24 +++++++++
 .../StorageModule/storage/ds-sqlite.properties  | 24 +++++++++
 .../storage/es-cassandra.properties             | 48 +++++++++++++++++
 .../StorageModule/storage/es-file.properties    | 46 ++++++++++++++++
 .../StorageModule/storage/es-geode.properties   | 44 +++++++++++++++
 .../storage/es-hazelcast.properties             | 23 ++++++++
 .../StorageModule/storage/es-jclouds.properties | 34 ++++++++++++
 .../StorageModule/storage/es-jdbm.properties    | 22 ++++++++
 .../StorageModule/storage/es-leveldb.properties | 29 ++++++++++
 .../StorageModule/storage/es-mongodb.properties | 53 ++++++++++++++++++
 .../StorageModule/storage/es-redis.properties   | 29 ++++++++++
 .../StorageModule/storage/es-riak.properties    | 57 ++++++++++++++++++++
 .../StorageModule/storage/es-sql.properties     | 27 ++++++++++
 24 files changed, 597 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTest.java
b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTest.java
index 3431081..8e2745a 100644
--- a/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTest.java
+++ b/extensions/entitystore-cassandra/src/test/java/org/apache/polygene/entitystore/cassandra/CassandraEntityStoreTest.java
@@ -52,7 +52,9 @@ public class CassandraEntityStoreTest
         module.services( CassandraEntityStoreService.class ).withTypes( CanRemoveAll.class
).withMixins( EmptyCassandraTableMixin.class );
 
         // START SNIPPET: assembly
-        new CassandraEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble(
module );
+        new CassandraEntityStoreAssembler()
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
         // END SNIPPET: assembly
 
         CassandraEntityStoreConfiguration cassandraConfig = config.forMixin( CassandraEntityStoreConfiguration.class
).declareDefaults();

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreConfiguration.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreConfiguration.java
b/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreConfiguration.java
index 011c454..8ed17c3 100644
--- a/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreConfiguration.java
+++ b/extensions/entitystore-hazelcast/src/main/java/org/apache/polygene/entitystore/hazelcast/HazelcastEntityStoreConfiguration.java
@@ -19,7 +19,7 @@
  */
 package org.apache.polygene.entitystore.hazelcast;
 
-import org.apache.polygene.api.common.UseDefaults;
+import org.apache.polygene.api.common.Optional;
 import org.apache.polygene.api.property.Property;
 
 /**
@@ -29,10 +29,21 @@ import org.apache.polygene.api.property.Property;
 public interface HazelcastEntityStoreConfiguration
 {
 
-    @UseDefaults
+    /**
+     * The location of the Hazelcast configuration XML file.
+     * If the property is not a URL, it will be tried as a path name on the classpath.
+     *
+     * @return The location of the Hazelcast configuration XML file. Defaults to hazelcast-default.xml
+     */
+    @Optional
     Property<String> configXmlLocation();
 
-    @UseDefaults
+    /**
+     * The name of the Hazelcast map that is the key-value entity store.
+     *
+     * @return the name of Hazelcast map containing the entities. Defaults to "polygene:entitystore:data"
+     */
+    @Optional
     Property<String> mapName();
 
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
index ac64f7f..6bbb613 100644
--- a/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
+++ b/extensions/entitystore-jclouds/src/test/java/org/apache/polygene/entitystore/jclouds/JCloudsS3Test.java
@@ -39,8 +39,8 @@ public class JCloudsS3Test extends AbstractEntityStoreTest
         ModuleAssembly config = module.layer().module( "config" );
         new EntityTestAssembler().assemble( config );
         new JCloudsEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble(
module );
-        JCloudsMapEntityStoreConfiguration defaults =
-            config.forMixin( JCloudsMapEntityStoreConfiguration.class ).declareDefaults();
+        JCloudsEntityStoreConfiguration defaults =
+            config.forMixin( JCloudsEntityStoreConfiguration.class ).declareDefaults();
 
         String host = DOCKER.getDockerHost();
         int port = DOCKER.getExposedContainerPort( "8000/tcp" );

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreConfiguration.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreConfiguration.java
b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreConfiguration.java
index 1042b69..b1131f8 100644
--- a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreConfiguration.java
+++ b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreConfiguration.java
@@ -58,5 +58,8 @@ public interface LevelDBEntityStoreConfiguration
 
     @Optional
     Property<Integer> writeBufferSize();
+
+    @Optional
+    Property<Boolean> errorIfExists();
 }
 // END SNIPPET: config

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreMixin.java
b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreMixin.java
index 1db246e..6e8eecf 100644
--- a/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreMixin.java
+++ b/extensions/entitystore-leveldb/src/main/java/org/apache/polygene/entitystore/leveldb/LevelDBEntityStoreMixin.java
@@ -127,6 +127,10 @@ public class LevelDBEntityStoreMixin
         {
             options.writeBufferSize( config.writeBufferSize().get() );
         }
+        if( config.errorIfExists().get() != null )
+        {
+            options.errorIfExists( config.errorIfExists().get() );
+        }
 
         // Open/Create the database
         File dbFile = new File( fileConfig.dataDirectory(), descriptor.identity().toString()
);
@@ -236,8 +240,7 @@ public class LevelDBEntityStoreMixin
     public void applyChanges( MapChanges changes )
         throws Exception
     {
-        final WriteBatch writeBatch = db.createWriteBatch();
-        try
+        try( WriteBatch writeBatch = db.createWriteBatch() )
         {
             changes.visitMap( new MapChanger()
             {
@@ -257,7 +260,6 @@ public class LevelDBEntityStoreMixin
                             String jsonState = toString();
                             writeBatch.put( ref.identity().toString().getBytes( charset ),
jsonState.getBytes( charset ) );
                         }
-
                     };
                 }
 
@@ -277,7 +279,6 @@ public class LevelDBEntityStoreMixin
                             writeBatch.put( mapChange.reference().identity().toString().getBytes(
charset ),
                                             jsonState.getBytes( charset ) );
                         }
-
                     };
                 }
 
@@ -287,14 +288,8 @@ public class LevelDBEntityStoreMixin
                 {
                     writeBatch.delete( ref.identity().toString().getBytes( charset ) );
                 }
-
             } );
             db.write( writeBatch );
         }
-        finally
-        {
-            writeBatch.close();
-        }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreMixin.java
b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreMixin.java
index 35fede7..306d6e7 100644
--- a/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreMixin.java
+++ b/extensions/entitystore-mongodb/src/main/java/org/apache/polygene/entitystore/mongodb/MongoDBEntityStoreMixin.java
@@ -62,7 +62,7 @@ public class MongoDBEntityStoreMixin
     implements ServiceActivation, MapEntityStore, MongoDBAccessors
 {
     private static final String DEFAULT_DATABASE_NAME = "polygene:entitystore";
-    private static final String DEFAULT_COLLECTION_NAME = "polygene:entitystore:entities";
+    private static final String DEFAULT_COLLECTION_NAME = "entities";
     public static final String IDENTITY_COLUMN = "_id";
     public static final String STATE_COLUMN = "state";
     @This

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/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 151dfab..2df7306 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/bootstrap.tmpl
@@ -41,10 +41,26 @@ public class <%- polygene.entitystore %>StorageModule
     public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
         throws AssemblyException
     {
-        new <%- polygene.entitystore %>EntityStoreAssembler()
+<% if( polygene.entitystore.contains( 'SQL' ) ) {
+%>        // DataSourceService
+        new DBCPDataSourceServiceAssembler()
+            .identifiedBy( "<%= polygene.entitystore.toLowerCase() %>-datasource-service"
)
+            .visibleIn( Visibility.module )
+            .withConfig( config, Visibility.layer )
+            .assemble( module );
+
+        // DataSource
+        new DataSourceAssembler()
+            .withDataSourceServiceIdentity( "<%= polygene.entitystore.toLowerCase() %>-datasource-service"
)
+            .identifiedBy( "ds-<%= polygene.entitystore.toLowerCase() %>" )
+            .visibleIn( Visibility.module )
+            .withCircuitBreaker()
+            .assemble( module );
+<% }
+%>        new <%- polygene.entitystore %>EntityStoreAssembler()
             .visibleIn( Visibility.application  )
             .withConfig( configModule, Visibility.application )
-            .identifiedBy( "entitystore-<%- polygene.entitystore.toLowerCase() %>"
)
+            .identifiedBy( "es-<%- polygene.entitystore.toLowerCase() %>" )
             .assemble( module );
         return module;
     }

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/module.js
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/module.js
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/module.js
index 3c17fcc..270d464 100644
--- a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/module.js
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/module.js
@@ -22,5 +22,24 @@ module.exports = {
         p.copyTemplate(p.ctx,
             'InfrastructureLayer/StorageModule/bootstrap.tmpl',
             'bootstrap/src/main/java/' + p.javaPackageDir + '/bootstrap/infrastructure/'
+ p.entitystore + 'StorageModule.java');
+
+        var configurationFile = 'InfrastructureLayer/StorageModule/storage/es-' + p.entitystore.toLowerCase()
+ '.properties';
+        var confFile = require(configurationFile);
+        if (confFile.existsSync(path)) {
+            p.copyTemplate(p.ctx,
+                configurationFile,
+                'app/src/main/resources/config/');
+        }
+
+        var datasourceFile = 'InfrastructureLayer/StorageModule/storage/ds-' + p.entitystore.toLowerCase()
+ '.properties';
+        var dsFile = require(datasourceFile);
+        if (dsFile.existsSync(path)) {
+            p.copyTemplate(p.ctx,
+                'InfrastructureLayer/StorageModule/storage/es-sql.properties',
+                'app/src/main/resources/config/es-' + p.entitystore.toLowerCase());
+            p.copyTemplate(p.ctx,
+                configurationFile,
+                'app/src/main/resources/config/');
+        }
     }
 };

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-derbysql.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-derbysql.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-derbysql.properties
new file mode 100644
index 0000000..39d9ca0
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-derbysql.properties
@@ -0,0 +1,24 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+enabled=true
+url=jdbc:derby:memory:<%= polygene.name %>;create=true
+driver=org.apache.derby.jdbc.EmbeddedDriver
+username=
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-h2sql.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-h2sql.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-h2sql.properties
new file mode 100644
index 0000000..69f4a33
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-h2sql.properties
@@ -0,0 +1,24 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+enabled=true
+url=jdbc:h2:file:h2-entities/
+driver=org.h2.Driver
+username=
+password=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-mysql.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-mysql.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-mysql.properties
new file mode 100644
index 0000000..c1fd527
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-mysql.properties
@@ -0,0 +1,24 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+enabled=true
+url=jdbc:mysql://127.0.0.1:3306/<%= polygene.name %>?profileSQL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&nullCatalogMeansCurrent=true&nullNamePatternMatchesAll=true
+driver=com.mysql.cj.jdbc.Driver
+username=polygene
+password=ThisIsGreat!

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-postgresql.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-postgresql.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-postgresql.properties
new file mode 100644
index 0000000..333d6aa
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-postgresql.properties
@@ -0,0 +1,24 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+enabled=true
+url=jdbc:postgres://127.0.0.1:5432/<%= polygene.name %>
+driver=org.postgresql.Driver
+username=polygene
+password=ThisIsGreat!

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-sqlite.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-sqlite.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-sqlite.properties
new file mode 100644
index 0000000..5c49ece
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/ds-sqlite.properties
@@ -0,0 +1,24 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+#
+#
+enabled=true
+url=jdbc:sqlite:sqlite-entities/
+driver=org.sqlite.JDBC
+username=polygene
+password=ThisIsGreat

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-cassandra.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-cassandra.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-cassandra.properties
new file mode 100644
index 0000000..c2a7a45
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-cassandra.properties
@@ -0,0 +1,48 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# A comma or space separated list of <code>hostname:port</code> to the
+# Cassandra cluster.
+#
+# A small list of hostnames should be given, as the client is capable to
+# discover the topology by itself and only need one host that it can connect
+# to.
+# Also not that Cassandra refuse to bind to all interfaces on a host, so you
+# need to know which hostname corresponds to the interface that Cassandra is
+# bound to. This may not include 'localhost'.
+# Defaults: null
+# hostnames=
+# The name of the cluster to connect to.
+# Defaults: polygene-cluster
+# clusterName=polygene-cluster
+# The replication factor to be used, if a KEYSPACE is created.
+# Defaults: 3
+# replicationFactor=3
+# The Cassandra client uses the CQL interface, and typically needs a username
+# and password.
+# Defaults: no user name will be attempted.
+# username=
+# password=
+# The name of the KEYSPACE to be used.
+# Defaults:polygene
+# keySpace=polygene
+# The name of the entity TABLE to be used.
+# All entities are stored in the same table, with one entity per row.
+# Defaults: entitystore
+# entityTableName=entitystore
+# Defines whether a KEYSPACE and entity TABLE should be created if not already
+# present in the Cassandra cluster.
+# Defaults: false
+# createIfMissing=false
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-file.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-file.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-file.properties
new file mode 100644
index 0000000..6683bf7
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-file.properties
@@ -0,0 +1,46 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# The directory where the File Entity Store will be keep its persisted state.
+#     If no configuration is provided at all, then the default location is
+#     {@code System.getProperty( "user.dir" ) + "/polygene/filestore"; }.
+#     If a configuration is given, the entity store will be placed in the
+#     DATA directory, which is operating system specific.
+# Default locations;
+#  Linux/Unix : {user}/.{application}/data
+#  OSX : {user}/Library/Application Support/{application}
+#  Windows : {user}/Application Data/{application}/data
+# where;
+#   {user} = Current User's home directory
+#   {application} = Application's name, as set in assembly.
+#
+# Ignored if the FileConfiguration service is found.
+# The content inside this directory should not be modified directly, and doing so may corrupt
the data.
+# directory=
+# Defines how many slice directories the store should use.
+# Many operating systems run into performance problems when the number of files
+# in a directory grows. If you expect a large number of entities in the file
+# entity store, it is wise to set the number of slices (default is 1) to an
+# approximation of the square root of number of expected entities.
+# For instance, if you estimate that you will have 1 million entities in the
+# file entity store, you should set the slices to 1000.
+# There is an limit of minimum 1 slice and maximum 10,000 slices, and if more
+# slices than that is needed, you are probably pushing this entitystore beyond
+# its capabilities.
+# Note that the slices() can not be changed once it has been set, as it would
+# cause the entity store not to find the entities anymore.
+#
+# @Range(min=1, max=10000)
+# slices=1

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-geode.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-geode.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-geode.properties
new file mode 100644
index 0000000..e257168
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-geode.properties
@@ -0,0 +1,44 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# Geode Topology.
+# Possible values; EMBEDDED, CLIENT_SERVER
+# Default: EMBEDDED
+#
+# topology=EMBEDDED
+# Geode Cache Name.
+# Default: polygene:cache
+#
+#cacheName=polygene:cache
+# Cache properties path, loaded from the classpath.
+# Default: <null>
+# cachePropertiesPath=
+# Cache Region Shortcut.
+#
+# In {@literal EMBEDDED} {@link #topology()}, defaults to  {@literal LOCAL},
+# see {@link org.apache.geode.cache.RegionShortcut}.
+#
+# In {@literal CLIENT_SERVER} {@link #topology()}, defaults to {@literal PROXY},
+# see {@link org.apache.geode.cache.client.ClientRegionShortcut}.
+#
+# Default: <null>
+#
+# regionShortcut=
+# Geode Region Name.
+#
+# Region names may only be alphanumeric and may contain hyphens or underscores.
+# Defaults: polygene-entitystore-region
+#
+# regionName=polygene-entitystore-region

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-hazelcast.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-hazelcast.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-hazelcast.properties
new file mode 100644
index 0000000..bd838b9
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-hazelcast.properties
@@ -0,0 +1,23 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# The location of the Hazelcast configuration XML file.
+# If the property is not a URL, it will be tried as a path name on the \
+# classpath.
+# Defaults: hazelcast-default.xml
+# configXmlLocation=hazelcast-default.xml
+# The name of the Hazelcast map that is the key-value entity store.
+# Defaults: polygene:entitystore:data
+# mapName=polygene:entitystore:data

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jclouds.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jclouds.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jclouds.properties
new file mode 100644
index 0000000..8fc32dc
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jclouds.properties
@@ -0,0 +1,34 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# Name of the JClouds provider to use.
+# Defaults: 'transient'.
+# provider=transient
+# Endpoint for the BlobStore provider.
+# Defaults:
+# endpoint=
+# Name of the JClouds container to use.
+# Defaults: polygene-entities
+# container=polygene-entities
+# The identifier and password (i.e. credentials) to connect to the JClouss
+# instance.
+#
+# identifier=
+# credential=
+# Use this to fine tune your provider implementation according to JClouds
+# documentation.
+# properties=
+
+

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jdbm.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jdbm.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jdbm.properties
new file mode 100644
index 0000000..095c379
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-jdbm.properties
@@ -0,0 +1,22 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# The file where the JDBM data will be stored
+# Default: System.getProperty( "user.dir" ) + "/polygene/jdbmstore.data";
+# file=
+# See JDBM documentation on RecordManagerOptions.AUTO_COMMIT
+# autoCommit=false
+# See JDBM documentation on RecordManagerOptions.DISABLE_TRANSACTIONS
+# disableTransactions=false

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-leveldb.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-leveldb.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-leveldb.properties
new file mode 100644
index 0000000..169a0d4
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-leveldb.properties
@@ -0,0 +1,29 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# LevelDB flavour, can be 'java' or 'jni'.
+# Defaults: tries 'jni' and fallback to 'java'.
+# flavour=java
+# blockRestartInterval=
+# blockSize=
+# cacheSize=
+# Type of compression to be used. Either SNAPPY or NONE
+# compression=NONE
+# Maximum number of files to open.
+# maxOpenFiles=
+# paranoidChecks=
+# verifyChecksums=
+# writeBufferSize=
+# errorIfExists=false
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-mongodb.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-mongodb.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-mongodb.properties
new file mode 100644
index 0000000..75ed36b
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-mongodb.properties
@@ -0,0 +1,53 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# Defaults: 127.0.0.1
+# hostname=
+# port=
+# nodes=
+# username=
+# password=
+# Defaults: polygene:entitystore
+# database=polygene:entitystore
+# Defaults: entities
+# collection=entities
+# The write concern to be used. One of the following;
+#
+# ACKNOWLEDGED : Write operations that use this write concern will wait for
+#                acknowledgement,  using the default write concern configured
+#                on the server.  This is the default value.
+#
+# W1 : Write operations that use this write concern will wait for
+#      acknowledgement from a single member.
+#
+# W2 : Write operations that use this write concern will wait for
+#      acknowledgement from two members.
+#
+# W3 : Write operations that use this write concern will wait for
+#      acknowledgement from three members.
+#
+# UNACKNOWLEDGED : Write operations that use this write concern will return
+#                  as soon as the message is written to the socket. Exceptions
+#                  are raised for network issues, but not server errors.
+#
+# JOURNALED : Write operations wait for the server to group commit to the
+#             journal file on disk.
+#
+# MAJORITY : Exceptions are raised for network issues, and server errors waits
+#            on a majority of servers for the write operation.
+#
+# Defaults: ACKNOWLEDGED
+# writeConcern=ACKNOWLEDGED
+

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-redis.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-redis.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-redis.properties
new file mode 100644
index 0000000..ae9e1da
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-redis.properties
@@ -0,0 +1,29 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# Redis host.
+# Defaults: 127.0.0.1
+# host=127.0.0.1
+# Redis port.
+# Defaults: 6379
+# port=6379
+# Connection timeout in milliseconds.
+# Defaults: 2000
+# timeout=2000
+# Password.
+# password=
+# Database number.
+# Defaults: 0
+# database=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-riak.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-riak.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-riak.properties
new file mode 100644
index 0000000..bca287b
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-riak.properties
@@ -0,0 +1,57 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# List of Riak Protocol Buffer hosts.
+#
+# Each entry can contain either an IP address / hostname
+# or an IP address / hostname followed by a column and the host's port.
+#
+# Defaults: 127.0.0.1
+# hosts=
+# User name to use for authentication.
+# username=
+# Password to use for authentication.
+# password=
+# Type of the keystore used for server certificate authentication.
+# @OneOf( { "PKCS12", "JCEKS", "JKS" } )
+# truststoreType=
+# Path of the keystore used for server certificate authentication.
+# truststorePath=
+# Password of the keystore used for server certificate authentication.
+# truststorePassword=
+# Type of the keystore used for client certificate authentication.
+# @OneOf( { "PKCS12", "JCEKS", "JKS" } )
+# keystoreType=
+# Path of the keystore used for client certificate authentication.
+# keystorePath=
+# Password of the keystore used for client certificate authentication.
+# keystorePassword=
+# Password of the key used for client certificate authentication.
+# keyPassword=
+# Riak Bucket where Entities state will be stored.
+# Defaults:" polygene:entities
+# bucket=polygene:entities
+# Cluster execution attempts.
+# clusterExecutionAttempts=
+# Minimum connections per node.
+# minConnections
+# Maximum connections per node.
+# maxConnections=
+# Block on maximum connections.
+# blockOnMaxConnections=
+# Connection timeout.
+# connectionTimeout=
+# Idle timeout.
+# idleTimeout=

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/58202230/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-sql.properties
----------------------------------------------------------------------
diff --git a/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-sql.properties
b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-sql.properties
new file mode 100644
index 0000000..4ce8bb3
--- /dev/null
+++ b/tools/generator-polygene/app/templates/InfrastructureLayer/StorageModule/storage/es-sql.properties
@@ -0,0 +1,27 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+# Name of the database schema to use.
+# Ignored on SQL databases that don't support schemas.
+# Defaults: POLYGENE_ES
+# schemaName=POLYGENE_ES
+# Name of the entities table.
+# Defaults: POLYGENE_ENTITIES
+# entityTableName=POLYGENE_ENTITIES
+# Defines whether the database schema and table should be created if not
+# already present.
+# Defaults: true
+# createIfMissing=true
+


Mime
View raw message