diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component
index 1c95674..bf2a2a8 100644
--- a/.settings/org.eclipse.wst.common.component
+++ b/.settings/org.eclipse.wst.common.component
@@ -1,10 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/de/tvo/database/DBHandler.java b/src/main/java/de/tvo/database/DBHandler.java
index 52be08e..36eb1a7 100644
--- a/src/main/java/de/tvo/database/DBHandler.java
+++ b/src/main/java/de/tvo/database/DBHandler.java
@@ -48,7 +48,7 @@ public class DBHandler {
static {
for (SchemataENUM sEnum : SchemataENUM.values()) {
try {
- Configuration configuration = new Configuration().configure("META-INF2/" + sEnum.name() + ".cfg.xml");
+ Configuration configuration = new Configuration().configure("META-INF/" + sEnum.name() + ".cfg.xml");
System.out.println(configuration.getProperties());
@@ -58,6 +58,7 @@ public class DBHandler {
try {
if (e instanceof org.hibernate.service.spi.ServiceException && e.getMessage().equals("Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]")) {
System.out.println("Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment], [" + sEnum.name() +"] is probably not bound in this Context.");
+ e.printStackTrace();
} else {
e.printStackTrace();
System.out.println("Hibernateconfiguration is missing for: " + sEnum.name() + ". Please create a valid META-INF/" + sEnum.name() + ".cfg.xml.");
diff --git a/src/main/java/de/tvo/database/tables/NLCONNECT/Nlconnect.java b/src/main/java/de/tvo/database/tables/NLCONNECT/Nlconnect.java
index e0433fe..c9e5b1a 100644
--- a/src/main/java/de/tvo/database/tables/NLCONNECT/Nlconnect.java
+++ b/src/main/java/de/tvo/database/tables/NLCONNECT/Nlconnect.java
@@ -19,7 +19,7 @@ public class Nlconnect implements Serializable {
private static final long serialVersionUID = 1L;
@Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
+ @GeneratedValue(strategy=GenerationType.AUTO)
@Column(unique=true, nullable=false)
private BigInteger ncid = null;
public BigInteger getNcid() { return ncid; }
@@ -50,6 +50,7 @@ public class Nlconnect implements Serializable {
private String nctype = null;
public String getNctype() { return nctype; }
public void setNctype(NanoTypeEnum nctype) { this.nctype = nctype.name(); }
+ public void setNctype(String nctype) { this.nctype = nctype; }
@Column(precision=9, nullable = false)
private Integer nccountpanel = null;
diff --git a/src/main/java/de/tvo/database/tables/NLCONNECT/NlconnectWorker.java b/src/main/java/de/tvo/database/tables/NLCONNECT/NlconnectWorker.java
index 852d139..0a36722 100644
--- a/src/main/java/de/tvo/database/tables/NLCONNECT/NlconnectWorker.java
+++ b/src/main/java/de/tvo/database/tables/NLCONNECT/NlconnectWorker.java
@@ -1,7 +1,8 @@
package de.tvo.database.tables.NLCONNECT;
+import java.util.List;
+
import de.tvo.database.DBHandler;
-import de.tvo.nanoleaf.enums.NanoTypeEnum;
import de.tvo.toolset.DBTools.SchemataENUM;
public class NlconnectWorker {
@@ -21,7 +22,7 @@ public class NlconnectWorker {
boolean finish = true;
try {
- DBHandler dbHandler = new DBHandler(SchemataENUM.MARIADBNL);
+ DBHandler dbHandler = new DBHandler(SchemataENUM.MARIADBNL, true, true);
dbHandler.insertObject(nlconnect);
@@ -37,4 +38,21 @@ public class NlconnectWorker {
return finish;
}
+ @SuppressWarnings("unchecked")
+ public List loadNlconnect() {
+ List nlconList = null;
+ try {
+ DBHandler dbHandler = new DBHandler(SchemataENUM.MARIADBNL, true, true);
+
+ nlconList = (List)dbHandler.loadAll("Nlconnect");
+
+ } catch (Exception e) {
+
+ e.printStackTrace();
+ throw e;
+ }
+
+ return nlconList;
+ }
+
}
diff --git a/src/main/resources/META-INF/MARIADBNL.cfg.xml.backup b/src/main/resources/META-INF/MARIADBNL.cfg.xml.backup
new file mode 100644
index 0000000..563c966
--- /dev/null
+++ b/src/main/resources/META-INF/MARIADBNL.cfg.xml.backup
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ org.mariadb.jdbc.Driver
+ jdbc:mariadb://localhost:3306/mariadbnl
+ root
+ jhi1nPw.
+
+
+ org.hibernate.dialect.MariaDBDialect
+
+
+ true
+ true
+
+
+ update
+
+
+ 5
+
+
+
+
+
+
+
\ No newline at end of file