Mercurial > dive4elements > river
changeset 3747:a33df17ac9bb
Use getGaugeValue method also for aeo and datum
flys-artifacts/trunk@5432 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 11 Sep 2012 13:07:59 +0000 |
parents | 7bc61f4ab26b |
children | 99f80469ba2b |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Sep 11 12:08:08 2012 +0000 +++ b/flys-artifacts/ChangeLog Tue Sep 11 13:07:59 2012 +0000 @@ -1,3 +1,9 @@ +2012-09-11 Björn Ricks <bjoern.ricks@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java: + Use getGaugeValue method also for aeo and datum. Also add some javadoc for + the getGaugeValue method. + 2012-09-11 Christian Lins <christian.lins@intevation.de> * doc/conf/second-themes.xml,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java Tue Sep 11 12:08:08 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java Tue Sep 11 13:07:59 2012 +0000 @@ -109,8 +109,8 @@ ec.addAttr(eg, "maxq", maxq, true); } - ec.addAttr(eg, "aeo", Double.toString(gauge.getAeo().doubleValue()), true); - ec.addAttr(eg, "datum", Double.toString(gauge.getDatum().doubleValue()), true); + ec.addAttr(eg, "aeo", getGaugeValue(gauge.getAeo()), true); + ec.addAttr(eg, "datum", getGaugeValue(gauge.getDatum()), true); egs.appendChild(eg); } @@ -122,6 +122,9 @@ return result; } + /** + * Returns a Double from a BigDecimal value or null if value is null + */ private String getGaugeValue(BigDecimal value) { if (value == null) { return null;