EMPIREDB-358
Apache licence headers added
diff --git a/empire-db-codegen/src/test/java/org/apache/empire/db/codegen/CodeGenParserTest.java b/empire-db-codegen/src/test/java/org/apache/empire/db/codegen/CodeGenParserTest.java
index 8e94a1e..745b578 100644
--- a/empire-db-codegen/src/test/java/org/apache/empire/db/codegen/CodeGenParserTest.java
+++ b/empire-db-codegen/src/test/java/org/apache/empire/db/codegen/CodeGenParserTest.java
@@ -58,9 +58,9 @@
assertNotNull("Expected EMPLOYEES table.", employees);
final List<DBRelation> relations = db.getRelations();
- assertEquals("Should have two relations.", 2, relations.size());
+ assertEquals("Should have one relation.", 1, relations.size());
- final DBRelation dbRelation = relations.get(1);
+ final DBRelation dbRelation = relations.get(0);
assertEquals("EMPLOYEES_DEPARTMENT_I_FK", dbRelation.getName());
final DBReference[] references = dbRelation.getReferences();
@@ -73,6 +73,6 @@
final DBColumn salary = employees.getColumn("SALARY");
assertThat(salary.getDataType(), is(DECIMAL));
- assertThat(salary.getSize(), is(121.212));
+ assertThat(salary.getSize(), is(10.2));
}
}
diff --git a/empire-db-codegen/src/test/resources/hsqldb/sample.properties b/empire-db-codegen/src/test/resources/hsqldb/sample.properties
index 470fd1a..5185fe1 100644
--- a/empire-db-codegen/src/test/resources/hsqldb/sample.properties
+++ b/empire-db-codegen/src/test/resources/hsqldb/sample.properties
@@ -1,35 +1,5 @@
-# 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.
-#
-#HSQL Database Engine 1.8.0.10
-#Tue Feb 02 00:26:54 CET 2010
-hsqldb.script_format=0
-runtime.gc_interval=0
-sql.enforce_strict_size=false
-hsqldb.cache_size_scale=8
-readonly=false
-hsqldb.nio_data_file=true
-hsqldb.cache_scale=14
-version=1.8.0
-hsqldb.default_table_type=memory
-hsqldb.cache_file_scale=1
-hsqldb.log_size=200
+#HSQL Database Engine 2.3.6
+#Wed Aug 18 16:10:13 CEST 2021
+version=2.3.6
modified=no
-hsqldb.cache_version=1.7.0
-hsqldb.original_version=1.8.0
-hsqldb.compatible_version=1.8.0
-hsqldb.files_readonly=true
+tx_timestamp=0
diff --git a/empire-db-codegen/src/test/resources/hsqldb/sample.script b/empire-db-codegen/src/test/resources/hsqldb/sample.script
index 926aca3..4aa1c17 100644
--- a/empire-db-codegen/src/test/resources/hsqldb/sample.script
+++ b/empire-db-codegen/src/test/resources/hsqldb/sample.script
@@ -1,35 +1,58 @@
--- 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.
-
+SET DATABASE UNIQUE NAME HSQLDB7B591E7E38
+SET DATABASE GC 0
+SET DATABASE DEFAULT RESULT MEMORY ROWS 0
+SET DATABASE EVENT LOG LEVEL 0
+SET DATABASE TRANSACTION CONTROL LOCKS
+SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
+SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE
+SET DATABASE TEXT TABLE DEFAULTS ''
+SET DATABASE SQL NAMES FALSE
+SET DATABASE SQL REFERENCES FALSE
+SET DATABASE SQL SIZE TRUE
+SET DATABASE SQL TYPES FALSE
+SET DATABASE SQL TDC DELETE TRUE
+SET DATABASE SQL TDC UPDATE TRUE
+SET DATABASE SQL CONCAT NULLS TRUE
+SET DATABASE SQL UNIQUE NULLS TRUE
+SET DATABASE SQL CONVERT TRUNCATE TRUE
+SET DATABASE SQL AVG SCALE 0
+SET DATABASE SQL DOUBLE NAN TRUE
+SET FILES WRITE DELAY 500 MILLIS
+SET FILES BACKUP INCREMENT TRUE
+SET FILES CACHE SIZE 10000
+SET FILES CACHE ROWS 50000
+SET FILES SCALE 32
+SET FILES LOB SCALE 32
+SET FILES DEFRAG 0
+SET FILES NIO TRUE
+SET FILES NIO SIZE 256
+SET FILES LOG TRUE
+SET FILES LOG SIZE 50
+CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
+ALTER USER SA SET LOCAL TRUE
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
-CREATE SEQUENCE DEP_ID_SEQUENCE AS INTEGER START WITH 3
-CREATE SEQUENCE EMPLOYEE_ID_SEQUENCE AS INTEGER START WITH 4
-CREATE MEMORY TABLE ORGANIZATIONS(ORGANIZATION_ID BIGINT NOT NULL,NAME VARCHAR(80) NOT NULL,CONSTRAINT ORGANIZATIONS_PK PRIMARY KEY(ORGANIZATION_ID))
-CREATE MEMORY TABLE DEPARTMENTS(DEPARTMENT_ID BIGINT NOT NULL,ORGANIZATION_ID BIGINT NOT NULL,NAME VARCHAR(80) NOT NULL,HEAD VARCHAR(80),BUSINESS_UNIT VARCHAR(4) NOT NULL,UPDATE_TIMESTAMP TIMESTAMP NOT NULL,CONSTRAINT DEPARTMENTS_PK PRIMARY KEY(DEPARTMENT_ID),CONSTRAINT DEPARTMENTS_ORGANIZATION_I_FK FOREIGN KEY(ORGANIZATION_ID) REFERENCES ORGANIZATIONS(ORGANIZATION_ID))
-CREATE UNIQUE INDEX DEARTMENT_NAME_IDX ON DEPARTMENTS(NAME)
-CREATE MEMORY TABLE EMPLOYEES(EMPLOYEE_ID BIGINT NOT NULL,SALUTATION VARCHAR(20),FIRSTNAME VARCHAR(40) NOT NULL,LASTNAME VARCHAR(40) NOT NULL,DATE_OF_BIRTH DATE,DEPARTMENT_ID BIGINT NOT NULL,GENDER VARCHAR(1),PHONE_NUMBER VARCHAR(40),EMAIL VARCHAR(80),SALARY DECIMAL(121,212),RETIRED BOOLEAN NOT NULL,UPDATE_TIMESTAMP TIMESTAMP NOT NULL,CONSTRAINT EMPLOYEES_PK PRIMARY KEY(EMPLOYEE_ID),CONSTRAINT EMPLOYEES_DEPARTMENT_I_FK FOREIGN KEY(DEPARTMENT_ID) REFERENCES DEPARTMENTS(DEPARTMENT_ID))
-CREATE UNIQUE INDEX EMPLOYEE_NAME_IDX ON EMPLOYEES(FIRSTNAME,LASTNAME,DATE_OF_BIRTH)
-CREATE USER SA PASSWORD ""
-GRANT DBA TO SA
-SET WRITE_DELAY 10
SET SCHEMA PUBLIC
-INSERT INTO ORGANIZATIONS VALUES(1,'Top')
-INSERT INTO DEPARTMENTS VALUES(1,1,'Development',NULL,'ITTK','2010-02-01 22:27:44.200000000')
-INSERT INTO DEPARTMENTS VALUES(2,1,'Sales',NULL,'ITTK','2010-02-01 22:27:44.212000000')
-INSERT INTO EMPLOYEES VALUES(1,NULL,'Peter','Sharp',NULL,1,'M','+49-7531-457160',NULL,NULL,FALSE,'2010-02-01 22:27:44.226000000')
-INSERT INTO EMPLOYEES VALUES(2,NULL,'Fred','Bloggs',NULL,1,'M','+49-5555-505050',NULL,NULL,FALSE,'2010-02-01 22:27:44.240000000')
-INSERT INTO EMPLOYEES VALUES(3,NULL,'Emma','White',NULL,2,'F','+49-040-125486',NULL,NULL,FALSE,'2010-02-01 22:27:44.243000000')
+CREATE SEQUENCE PUBLIC.DEP_ID_SEQUENCE AS INTEGER START WITH 1
+CREATE SEQUENCE PUBLIC.EMPLOYEE_ID_SEQUENCE AS INTEGER START WITH 1
+CREATE MEMORY TABLE PUBLIC.DEPARTMENTS(DEPARTMENT_ID INTEGER NOT NULL PRIMARY KEY,NAME VARCHAR(80) NOT NULL,HEAD VARCHAR(80),BUSINESS_UNIT VARCHAR(4) NOT NULL,UPDATE_TIMESTAMP TIMESTAMP NOT NULL)
+CREATE UNIQUE INDEX DEPARTMENT_NAME_IDX ON PUBLIC.DEPARTMENTS(NAME)
+CREATE MEMORY TABLE PUBLIC.EMPLOYEES(EMPLOYEE_ID INTEGER NOT NULL PRIMARY KEY,SALUTATION VARCHAR(20),FIRSTNAME VARCHAR(40) NOT NULL,LASTNAME VARCHAR(40) NOT NULL,DATE_OF_BIRTH DATE,DATE_WITH_TIME TIMESTAMP,DEPARTMENT_ID INTEGER NOT NULL,GENDER VARCHAR(1),PHONE_NUMBER VARCHAR(40),EMAIL VARCHAR(80),SALARY DECIMAL(10,2),RETIRED BIT(1) NOT NULL,UPDATE_TIMESTAMP TIMESTAMP NOT NULL,CONSTRAINT EMPLOYEES_DEPARTMENT_I_FK FOREIGN KEY(DEPARTMENT_ID) REFERENCES PUBLIC.DEPARTMENTS(DEPARTMENT_ID))
+CREATE UNIQUE INDEX EMPLOYEE_NAME_IDX ON PUBLIC.EMPLOYEES(FIRSTNAME,LASTNAME,DATE_OF_BIRTH)
+ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
+ALTER SEQUENCE PUBLIC.DEP_ID_SEQUENCE RESTART WITH 3
+ALTER SEQUENCE PUBLIC.EMPLOYEE_ID_SEQUENCE RESTART WITH 4
+SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
+GRANT DBA TO SA
+SET SCHEMA SYSTEM_LOBS
+INSERT INTO BLOCKS VALUES(0,2147483647,0)
+SET SCHEMA PUBLIC
+INSERT INTO DEPARTMENTS VALUES(1,'Development',NULL,'ITTK','2021-08-18 13:59:17.120000')
+INSERT INTO DEPARTMENTS VALUES(2,'Sales',NULL,'ITTK','2021-08-18 13:59:17.289000')
+INSERT INTO EMPLOYEES VALUES(1,NULL,'Peter','Sharp',NULL,NULL,1,'M','+49-7531-457160',NULL,NULL,'0','2021-08-18 13:59:18.818000')
+INSERT INTO EMPLOYEES VALUES(2,NULL,'Fred','Bloggs',NULL,NULL,1,'M','+49-5555-505050',NULL,NULL,'0','2021-08-18 13:59:19.830000')
+INSERT INTO EMPLOYEES VALUES(3,NULL,'Emma','White',NULL,NULL,2,'F','+49-040-125486',NULL,NULL,'0','2021-08-18 13:59:19.559000')
diff --git a/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java b/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
index 544468c..723cc3b 100644
--- a/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
+++ b/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
@@ -26,7 +26,6 @@
import org.apache.empire.commons.DateUtils;
import org.apache.empire.commons.Options;
import org.apache.empire.commons.StringUtils;
-import org.apache.empire.data.DataMode;
import org.apache.empire.data.DataType;
import org.apache.empire.db.DBCmdParam;
import org.apache.empire.db.DBCmdType;
@@ -38,7 +37,7 @@
import org.apache.empire.db.DBRecord;
import org.apache.empire.db.DBSQLScript;
import org.apache.empire.db.DBTableColumn;
-import org.apache.empire.db.exceptions.StatementFailedException;
+import org.apache.empire.db.exceptions.ConstraintViolationException;
import org.apache.empire.db.h2.DBDatabaseDriverH2;
import org.apache.empire.db.postgresql.DBDatabaseDriverPostgreSQL;
import org.slf4j.Logger;
@@ -650,7 +649,7 @@
// This statement is designed to fail since cascaded deletes are not on!
try {
db.T_DEPARTMENTS.deleteRecord(idDepartment, conn);
- } catch(StatementFailedException e) {
+ } catch(ConstraintViolationException e) {
System.out.println("Delete of department failed as expected due to existing depending records.");
}
}
diff --git a/empire-db-examples/empire-db-example-codegen/src/test/java/org/apache/empire/db/examples/codegen/ValidatePluginRunTest.java b/empire-db-examples/empire-db-example-codegen/src/test/java/org/apache/empire/db/examples/codegen/ValidatePluginRunTest.java
deleted file mode 100644
index a0a86d0..0000000
--- a/empire-db-examples/empire-db-example-codegen/src/test/java/org/apache/empire/db/examples/codegen/ValidatePluginRunTest.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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.
- */
-package org.apache.empire.db.examples.codegen;
-
-import java.io.File;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class ValidatePluginRunTest {
-
- private static Connection conn = null;
-
- @BeforeClass
- public static void openConnection() throws Exception {
- Class.forName("org.hsqldb.jdbcDriver").newInstance();
- conn = DriverManager.getConnection("jdbc:hsqldb:file:src/test/resources/hsqldb/sample;shutdown=true", "sa", "");
- }
-
- @AfterClass
- public static void closeConnection() throws Exception {
- if (conn != null) {
- try {
- Statement st = conn.createStatement();
- // properly shutdown hsqldb
- st.execute("SHUTDOWN");
- } catch (SQLException ex) {
- ex.printStackTrace();
- }
- conn.close();
- }
- }
-
- @Test
- public void testTargetFolder() {
- File file = new File("target/generated-sources/empiredb");
- if (file.exists())
- System.out.println("CodeGenerator sources avaialbe in " + file.toString());
- else
- System.out.println("CodeGenerator sources have not yet been generated!");
- }
-
- /*
- @Test
- public void testTargetFolder() {
- File file = new File("target/generated-sources/empiredb");
- assertTrue("No sources generated", file.exists());
- }
-
- @Test
- public void testGeneratedClass() throws ClassNotFoundException {
- Class<?> cls = Class.forName("org.apache.empire.db.example.MyDB");
- assertNotNull("Could not load generated class.", cls);
- }
-
- @Test
- public void useGeneratedCode() throws Exception {
-
- System.out.println("Opening database...");
- DBDatabaseDriver driver = new DBDatabaseDriverHSql();
-
- MyDatabase db = MyDatabase.get();
- db.open(driver, conn);
-
- System.out.println("Createing query command...");
- Employees EMP = db.EMPLOYEES;
- DBCommand cmd = db.createCommand();
- cmd.select(EMP.EMPLOYEE_ID, EMP.FIRSTNAME);
-
- int rowCount = 0;
- DBReader reader = new DBReader();
- try {
- System.out.println("Executing query:");
- System.err.println(cmd.getSelect());
- reader.open(cmd, conn);
- System.out.println("Reading results:");
- while (reader.moveNext()) {
- rowCount++;
- System.out.println(reader.getString(EMP.EMPLOYEE_ID) + "\t" + reader.getString(EMP.FIRSTNAME));
- }
- System.out.println("Result contained "+String.valueOf(rowCount)+" records");
- } finally {
- reader.close();
- }
-
- assertEquals("We expect 3 rows", 3, rowCount);
- }
- */
-
-}
diff --git a/empire-db-examples/empire-db-example-codegen/src/test/resources/hsqldb/sample.properties b/empire-db-examples/empire-db-example-codegen/src/test/resources/hsqldb/sample.properties
deleted file mode 100644
index 470fd1a..0000000
--- a/empire-db-examples/empire-db-example-codegen/src/test/resources/hsqldb/sample.properties
+++ /dev/null
@@ -1,35 +0,0 @@
-# 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.
-#
-#HSQL Database Engine 1.8.0.10
-#Tue Feb 02 00:26:54 CET 2010
-hsqldb.script_format=0
-runtime.gc_interval=0
-sql.enforce_strict_size=false
-hsqldb.cache_size_scale=8
-readonly=false
-hsqldb.nio_data_file=true
-hsqldb.cache_scale=14
-version=1.8.0
-hsqldb.default_table_type=memory
-hsqldb.cache_file_scale=1
-hsqldb.log_size=200
-modified=no
-hsqldb.cache_version=1.7.0
-hsqldb.original_version=1.8.0
-hsqldb.compatible_version=1.8.0
-hsqldb.files_readonly=true
diff --git a/empire-db-examples/empire-db-example-codegen/src/test/resources/hsqldb/sample.script b/empire-db-examples/empire-db-example-codegen/src/test/resources/hsqldb/sample.script
deleted file mode 100644
index 7642111..0000000
--- a/empire-db-examples/empire-db-example-codegen/src/test/resources/hsqldb/sample.script
+++ /dev/null
@@ -1,33 +0,0 @@
--- 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.
-
-CREATE SCHEMA PUBLIC AUTHORIZATION DBA
-CREATE SEQUENCE DEP_ID_SEQUENCE AS INTEGER START WITH 3
-CREATE SEQUENCE EMPLOYEE_ID_SEQUENCE AS INTEGER START WITH 4
-CREATE MEMORY TABLE DEPARTMENTS(DEPARTMENT_ID BIGINT NOT NULL,NAME VARCHAR(80) NOT NULL,HEAD VARCHAR(80),BUSINESS_UNIT VARCHAR(4) NOT NULL,UPDATE_TIMESTAMP TIMESTAMP NOT NULL,CONSTRAINT DEPARTMENTS_PK PRIMARY KEY(DEPARTMENT_ID))
-CREATE UNIQUE INDEX DEARTMENT_NAME_IDX ON DEPARTMENTS(NAME)
-CREATE MEMORY TABLE EMPLOYEES(EMPLOYEE_ID BIGINT NOT NULL,SALUTATION VARCHAR(20),FIRSTNAME VARCHAR(40) NOT NULL,LASTNAME VARCHAR(40) NOT NULL,DATE_OF_BIRTH DATE,DEPARTMENT_ID BIGINT NOT NULL,GENDER VARCHAR(1),PHONE_NUMBER VARCHAR(40),EMAIL VARCHAR(80),SALARY DECIMAL(10,2),RETIRED BOOLEAN NOT NULL,UPDATE_TIMESTAMP TIMESTAMP NOT NULL,CONSTRAINT EMPLOYEES_PK PRIMARY KEY(EMPLOYEE_ID),CONSTRAINT EMPLOYEES_DEPARTMENT_I_FK FOREIGN KEY(DEPARTMENT_ID) REFERENCES DEPARTMENTS(DEPARTMENT_ID))
-CREATE UNIQUE INDEX EMPLOYEE_NAME_IDX ON EMPLOYEES(FIRSTNAME,LASTNAME,DATE_OF_BIRTH)
-CREATE USER SA PASSWORD ""
-GRANT DBA TO SA
-SET WRITE_DELAY 10
-SET SCHEMA PUBLIC
-INSERT INTO DEPARTMENTS VALUES(1,'Development',NULL,'ITTK','2010-02-01 22:27:44.200000000')
-INSERT INTO DEPARTMENTS VALUES(2,'Sales',NULL,'ITTK','2010-02-01 22:27:44.212000000')
-INSERT INTO EMPLOYEES VALUES(1,NULL,'Peter','Sharp',NULL,1,'M','+49-7531-457160',NULL,NULL,FALSE,'2010-02-01 22:27:44.226000000')
-INSERT INTO EMPLOYEES VALUES(2,NULL,'Fred','Bloggs',NULL,1,'M','+49-5555-505050',NULL,NULL,FALSE,'2010-02-01 22:27:44.240000000')
-INSERT INTO EMPLOYEES VALUES(3,NULL,'Emma','White',NULL,2,'F','+49-040-125486',NULL,NULL,FALSE,'2010-02-01 22:27:44.243000000')
diff --git a/empire-db-examples/empire-db-example-codegen/src/test/resources/log4j.properties b/empire-db-examples/empire-db-example-codegen/src/test/resources/log4j.properties
deleted file mode 100644
index 031ae65..0000000
--- a/empire-db-examples/empire-db-example-codegen/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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.
-
-log4j.rootCategory=FATAL, console
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.conversionPattern = %d{ISO8601} %-5p [%c] - %m%n
diff --git a/empire-db-examples/empire-db-example-spring-boot/pom.xml b/empire-db-examples/empire-db-example-spring-boot/pom.xml
index d6c2e26..71f25b3 100644
--- a/empire-db-examples/empire-db-example-spring-boot/pom.xml
+++ b/empire-db-examples/empire-db-example-spring-boot/pom.xml
@@ -1,93 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
<parent>
<groupId>org.apache.empire-db</groupId>
<artifactId>empire-db-examples</artifactId>
<version>2.5.1-SNAPSHOT</version>
</parent>
- <name>Apache Empire-db Spring Boot Example</name>
- <artifactId>empire-db-example-spring-boot</artifactId>
- <packaging>jar</packaging>
-
- <dependencies>
- <!--
- <dependency>
- <groupId>org.apache.empire-db</groupId>
- <artifactId>empire-db</artifactId>
- <version>2.5.1-SNAPSHOT</version>
- </dependency>
- -->
- <dependency>
- <groupId>org.apache.empire-db</groupId>
- <artifactId>empire-db</artifactId>
- </dependency>
+ <name>Apache Empire-db Spring Boot Example</name>
+ <artifactId>empire-db-example-spring-boot</artifactId>
+ <packaging>jar</packaging>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter</artifactId>
- <version>2.5.3</version>
- </dependency>
+ <dependencies>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-jdbc</artifactId>
- <version>2.5.3</version>
- </dependency>
-
- <!-- This dependency should be declared as runtime but the exec plugin is broken atm... -->
- <dependency>
- <groupId>org.hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <scope>runtime</scope>
- </dependency>
- <!-- <dependency>
- <groupId>postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>8.3-603.jdbc3</version>
- <scope>runtime</scope>
- </dependency> -->
- <!-- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <scope>runtime</scope>
- </dependency> -->
- <!-- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <scope>runtime</scope>
- </dependency> -->
- <!-- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.6</version>
- <scope>runtime</scope>
- </dependency>-->
- <!-- msssql -->
- <!-- <dependency>
- <groupId>com.microsoft.sqlserver</groupId>
- <artifactId>mssql-jdbc</artifactId>
- <version>7.0.0.jre8</version>
- <scope>runtime</scope>
- </dependency>-->
- <!-- ojdbc
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc6</artifactId>
- <version>11.2.0.3.0</version>
- <scope>runtime</scope>
- </dependency>
- -->
- </dependencies>
-
- <build>
- <plugins>
- <!-- Package as an executable jar -->
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-</project>
\ No newline at end of file
+ <dependency>
+ <groupId>org.apache.empire-db</groupId>
+ <artifactId>empire-db</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <version>2.5.3</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-jdbc</artifactId>
+ <version>2.5.3</version>
+ </dependency>
+
+ <!-- This dependency should be declared as runtime but the exec plugin is broken atm... -->
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <!-- Package as an executable jar -->
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/empire-db-examples/empire-db-example-spring-boot/src/main/java/org/apache/empire/samples/springboot/EmpireDBConfigProperties.java b/empire-db-examples/empire-db-example-spring-boot/src/main/java/org/apache/empire/samples/springboot/EmpireDBConfigProperties.java
index c296d1b..7b97ea3 100644
--- a/empire-db-examples/empire-db-example-spring-boot/src/main/java/org/apache/empire/samples/springboot/EmpireDBConfigProperties.java
+++ b/empire-db-examples/empire-db-example-spring-boot/src/main/java/org/apache/empire/samples/springboot/EmpireDBConfigProperties.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
package org.apache.empire.samples.springboot;
import java.util.Map;
diff --git a/empire-db-examples/empire-db-example-spring-boot/src/main/java/org/apache/empire/samples/springboot/SampleApp.java b/empire-db-examples/empire-db-example-spring-boot/src/main/java/org/apache/empire/samples/springboot/SampleApp.java
index c4063db..2465f4c 100644
--- a/empire-db-examples/empire-db-example-spring-boot/src/main/java/org/apache/empire/samples/springboot/SampleApp.java
+++ b/empire-db-examples/empire-db-example-spring-boot/src/main/java/org/apache/empire/samples/springboot/SampleApp.java
@@ -1,3 +1,21 @@
+/*
+ * 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.
+ */
package org.apache.empire.samples.springboot;
import java.lang.reflect.InvocationTargetException;
diff --git a/pom.xml b/pom.xml
index 4115162..0ef8864 100644
--- a/pom.xml
+++ b/pom.xml
@@ -485,6 +485,7 @@
<!-- file types -->
<exclude>**/*.iml</exclude>
<exclude>**/*.json</exclude>
+ <exclude>**/*.jml</exclude>
<!-- specific files -->
<exclude>**/META-INF/MANIFEST.MF</exclude>
<exclude>**/.project</exclude>