Mercurial > dive4elements > river
diff flys-aft/src/main/java/de/intevation/aft/DischargeTable.java @ 4134:9c78264109ad
AFT: Ignored tables with unset GUELTIG_VON or GUELTIG_BIS values.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Mon, 15 Oct 2012 12:00:28 +0200 |
parents | 06891562e633 |
children | 79bb64f66c74 |
line wrap: on
line diff
--- a/flys-aft/src/main/java/de/intevation/aft/DischargeTable.java Mon Oct 15 09:31:50 2012 +0200 +++ b/flys-aft/src/main/java/de/intevation/aft/DischargeTable.java Mon Oct 15 12:00:28 2012 +0200 @@ -228,7 +228,21 @@ Date from = rs.getDate("GUELTIG_VON"); Date to = rs.getDate("GUELTIG_BIS"); - if (from != null && to != null && from.compareTo(to) > 0) { + if (from == null) { + log.warn("AFT: ABFLUSSTAFEL_NR = " + + dtId + ": GUELTIG_VON = NULL -> ignored."); + } + + if (to == null) { + log.warn("AFT: ABFLUSSTAFEL_NR = " + + dtId + ": GUELTIG_BIS = NULL -> ignored."); + } + + if (from == null || to == null) { + continue; + } + + if (from.compareTo(to) > 0) { log.warn("AFT: ABFLUSSTAFEL_NR = " + dtId + ": " + from + " > " + to + ". -> swap"); Date temp = from; @@ -252,9 +266,7 @@ double datumValue = rs.getDouble("PEGELNULLPUNKT"); Double datum = rs.wasNull() ? null : datumValue; - TimeInterval timeInterval = from == null - ? null - : new TimeInterval(from, to); + TimeInterval timeInterval = new TimeInterval(from, to); DischargeTable dt = new DischargeTable( dtId,