changeset 1109:5bc1260b55f1

merged.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 27 Oct 2016 11:49:47 +0200
parents de7184e1370d (current diff) 2c198f13270b (diff)
children d85562f07e3d
files
diffstat 2 files changed, 48 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/db_schema/lada_data.sql	Thu Oct 27 11:48:53 2016 +0200
+++ b/db_schema/lada_data.sql	Thu Oct 27 11:49:47 2016 +0200
@@ -90,6 +90,10 @@
 
 ALTER TABLE probe ENABLE TRIGGER ALL;
 
+SELECT setval(pg_get_serial_sequence('probe', 'id'),
+    (SELECT max(id) FROM probe));
+
+
 --
 -- TOC entry 4687 (class 0 OID 1170823)
 -- Dependencies: 289
@@ -186,6 +190,10 @@
 
 ALTER TABLE messung ENABLE TRIGGER ALL;
 
+SELECT setval(pg_get_serial_sequence('messung', 'id'),
+    (SELECT max(id) FROM messung));
+
+
 --
 -- TOC entry 4681 (class 0 OID 1170751)
 -- Dependencies: 283
@@ -202,6 +210,10 @@
 
 ALTER TABLE kommentar_m ENABLE TRIGGER ALL;
 
+SELECT setval(pg_get_serial_sequence('kommentar_m', 'id'),
+    (SELECT max(id) FROM kommentar_m));
+
+
 --
 -- TOC entry 4682 (class 0 OID 1170759)
 -- Dependencies: 284
@@ -226,6 +238,10 @@
 
 ALTER TABLE kommentar_p ENABLE TRIGGER ALL;
 
+SELECT setval(pg_get_serial_sequence('kommentar_p', 'id'),
+    (SELECT max(id) FROM kommentar_p));
+
+
 --
 -- TOC entry 4684 (class 0 OID 1170769)
 -- Dependencies: 286
@@ -801,6 +817,10 @@
 
 ALTER TABLE messwert ENABLE TRIGGER ALL;
 
+SELECT setval(pg_get_serial_sequence('messwert', 'id'),
+    (SELECT max(id) FROM messwert));
+
+
 --
 -- TOC entry 4691 (class 0 OID 1170844)
 -- Dependencies: 293
@@ -891,6 +911,10 @@
 
 ALTER TABLE ortszuordnung ENABLE TRIGGER ALL;
 
+SELECT setval(pg_get_serial_sequence('ortszuordnung', 'id'),
+    (SELECT max(id) FROM ortszuordnung));
+
+
 --
 -- TOC entry 4695 (class 0 OID 1170895)
 -- Dependencies: 297
@@ -987,6 +1011,10 @@
 
 ALTER TABLE status_protokoll ENABLE TRIGGER ALL;
 
+SELECT setval(pg_get_serial_sequence('status_protokoll', 'id'),
+    (SELECT max(id) FROM status_protokoll));
+
+
 --
 -- TOC entry 4696 (class 0 OID 1170904)
 -- Dependencies: 298
@@ -1004,6 +1032,9 @@
 
 ALTER TABLE zusatz_wert ENABLE TRIGGER ALL;
 
+SELECT setval(pg_get_serial_sequence('zusatz_wert', 'id'),
+    (SELECT max(id) FROM zusatz_wert));
+
 --
 -- PostgreSQL database dump complete
 --
--- a/src/main/java/de/intevation/lada/importer/laf/LafObjectListener.java	Thu Oct 27 11:48:53 2016 +0200
+++ b/src/main/java/de/intevation/lada/importer/laf/LafObjectListener.java	Thu Oct 27 11:49:47 2016 +0200
@@ -86,9 +86,17 @@
         if (currentProbe != null) {
             data.addProbe(currentProbe);
             if (!currentErrors.isEmpty()) {
-                String identifier = currentProbe.getAttributes().get("PROBE_ID");
-                identifier = identifier == null ? currentProbe.getAttributes().get("PROBEN_NR") : null;
-                identifier = identifier == null ? currentProbe.getAttributes().get("HAUPTPROBEN_NR") : "not identified";
+                String identifier = currentProbe.getAttributes()
+                    .get("PROBE_ID");
+                identifier = identifier == null
+                    ? currentProbe.getAttributes().get("PROBEN_NR")
+                    : identifier;
+                identifier = identifier == null
+                    ? currentProbe.getAttributes().get("HAUPTPROBENNUMMER")
+                    : identifier;
+                identifier = identifier == null
+                    ? "not identified"
+                    : identifier;
                 System.out.println("exit: " + identifier);
                 errors.put(identifier, currentErrors);
             }
@@ -126,8 +134,12 @@
                 System.out.println("item: " + item.getKey());
             }
             String identifier = currentProbe.getAttributes().get("PROBE_ID");
-            identifier = identifier == null ? currentProbe.getAttributes().get("PROBEN_NR") : null;
-            identifier = identifier == null ? currentProbe.getAttributes().get("HAUPTPROBEN_NR") : null;
+            identifier = identifier == null
+                ? currentProbe.getAttributes().get("PROBEN_NR")
+                : identifier;
+            identifier = identifier == null
+                ? currentProbe.getAttributes().get("HAUPTPROBENNUMMER")
+                : identifier;
             identifier = identifier == null ? "not identified" : identifier;
             System.out.println("exit probe: " + identifier);
             errors.put(identifier, currentErrors);
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)