changeset 355:490dc50365e7

Added reset for errors and warnings and add error if probeid is NULL.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 05 Sep 2013 13:13:43 +0200
parents 97aa76c9c2d3
children 3f03e954c04d
files src/main/java/de/intevation/lada/data/importer/LAFWriter.java src/main/java/de/intevation/lada/data/importer/Writer.java
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/importer/LAFWriter.java	Thu Sep 05 13:12:23 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/importer/LAFWriter.java	Thu Sep 05 13:13:43 2013 +0200
@@ -100,6 +100,13 @@
                     warnings.add(new ReportData(key, "validation", warn.get(key)));
                 }
             }
+            if (probe.getProbeId() == null) {
+                errors.add(new ReportData("probeId", "missing", 673));
+            }
+            return false;
+        }
+        if (probe.getProbeId() == null) {
+            errors.add(new ReportData("probeId", "missing", 673));
             return false;
         }
         persist(probe);
@@ -367,7 +374,6 @@
         return false;
     }
 
-    
     /**
      * @return the errors
      */
@@ -375,11 +381,15 @@
         return errors;
     }
 
-    
     /**
      * @return the warnings
      */
     public List<ReportData> getWarnings() {
         return warnings;
     }
+
+    public void reset() {
+        this.warnings = new ArrayList<ReportData>();
+        this.errors = new ArrayList<ReportData>();
+    }
 }
--- a/src/main/java/de/intevation/lada/data/importer/Writer.java	Thu Sep 05 13:12:23 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/importer/Writer.java	Thu Sep 05 13:13:43 2013 +0200
@@ -29,4 +29,5 @@
         List<LMesswert> werte);
     public List<ReportData> getErrors();
     public List<ReportData> getWarnings();
+    public void reset();
 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)