# HG changeset patch # User Raimund Renkert # Date 1378379623 -7200 # Node ID 490dc50365e767ac647d2871f1702618af7be786 # Parent 97aa76c9c2d3ebb681d91c18f92aeaecc27fd9bb Added reset for errors and warnings and add error if probeid is NULL. diff -r 97aa76c9c2d3 -r 490dc50365e7 src/main/java/de/intevation/lada/data/importer/LAFWriter.java --- 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 getWarnings() { return warnings; } + + public void reset() { + this.warnings = new ArrayList(); + this.errors = new ArrayList(); + } } diff -r 97aa76c9c2d3 -r 490dc50365e7 src/main/java/de/intevation/lada/data/importer/Writer.java --- 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 werte); public List getErrors(); public List getWarnings(); + public void reset(); }