aboutsummaryrefslogtreecommitdiffstats
path: root/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/GenSchema.java
diff options
context:
space:
mode:
Diffstat (limited to 'feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/GenSchema.java')
-rw-r--r--feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/GenSchema.java59
1 files changed, 28 insertions, 31 deletions
diff --git a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/GenSchema.java b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/GenSchema.java
index a0af2e6c..38e3ec23 100644
--- a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/GenSchema.java
+++ b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/GenSchema.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* feature-session-persistence
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed 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.
@@ -29,41 +29,38 @@ import javax.persistence.Persistence;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/**
- * Generates the schema DDL files.
- */
+/** Generates the schema DDL files. */
public class GenSchema {
- private static final Logger logger = LoggerFactory.getLogger(PersistenceFeatureTest.class);
+ private static final Logger logger = LoggerFactory.getLogger(PersistenceFeatureTest.class);
- private EntityManagerFactory emf;
+ private EntityManagerFactory emf;
- /**
- * Opens the EMF, which generates the schema, as a side-effect.
- *
- * @throws Exception
- */
- private GenSchema() throws Exception {
- Map<String, Object> propMap = new HashMap<>();
+ /**
+ * Opens the EMF, which generates the schema, as a side-effect.
+ *
+ * @throws Exception exception
+ */
+ private GenSchema() throws Exception {
+ Map<String, Object> propMap = new HashMap<>();
- propMap.put("javax.persistence.jdbc.driver", "org.h2.Driver");
- propMap.put("javax.persistence.jdbc.url", "jdbc:h2:mem:JpaDroolsSessionConnectorTest");
+ propMap.put("javax.persistence.jdbc.driver", "org.h2.Driver");
+ propMap.put("javax.persistence.jdbc.url", "jdbc:h2:mem:JpaDroolsSessionConnectorTest");
- emf = Persistence.createEntityManagerFactory("schemaDroolsPU", propMap);
+ emf = Persistence.createEntityManagerFactory("schemaDroolsPU", propMap);
- emf.close();
- }
+ emf.close();
+ }
- /**
- * This is is provided as a utility for producing a basic ddl schema file in
- * the sql directory.
- */
- public static void main(String[] args) {
- try {
- new GenSchema();
+ /**
+ * This is is provided as a utility for producing a basic ddl schema file in the sql directory.
+ */
+ public static void main(String[] args) {
+ try {
+ new GenSchema();
- } catch (Exception e) {
- logger.error("failed to generate schema", e);
- }
- }
+ } catch (Exception e) {
+ logger.error("failed to generate schema", e);
+ }
+ }
}