Mercurial > dive4elements > river
changeset 5457:1b676aefaf3a
Added gauge name to measurement station parser and model.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 27 Mar 2013 13:01:53 +0100 |
parents | e47c4e9b050e |
children | e667c127b600 |
files | flys-backend/src/main/java/de/intevation/flys/importer/ImportMeasurementStation.java flys-backend/src/main/java/de/intevation/flys/model/MeasurementStation.java |
diffstat | 2 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportMeasurementStation.java Wed Mar 27 12:55:57 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportMeasurementStation.java Wed Mar 27 13:01:53 2013 +0100 @@ -96,8 +96,8 @@ log.info("create new measurement station '" + name + "'"); peer = new MeasurementStation(river, name, measurementType, - riverside, station, range, gauge, observationTimerange, - operator, comment); + riverside, station, range, gauge, this.gauge, + observationTimerange, operator, comment); session.save(peer); }
--- a/flys-backend/src/main/java/de/intevation/flys/model/MeasurementStation.java Wed Mar 27 12:55:57 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/model/MeasurementStation.java Wed Mar 27 13:01:53 2013 +0100 @@ -29,6 +29,7 @@ private River river; private Gauge gauge; + private String gaugeName; private TimeInterval observationTimerange; @@ -37,7 +38,9 @@ public MeasurementStation(River river, String name, String measurementType, String riverside, Double station, Range range, Gauge gauge, - TimeInterval observationTimerange, String operator, String comment) { + String gaugeName, TimeInterval observationTimerange, String operator, + String comment + ) { this.river = river; this.name = name; this.measurementType = measurementType; @@ -45,6 +48,7 @@ this.station = station; this.range = range; this.gauge = gauge; + this.gaugeName = gaugeName; this.observationTimerange = observationTimerange; this.operator = operator; this.comment = comment; @@ -109,6 +113,15 @@ this.gauge = gauge; } + @Column(name = "reference_gauge_name") + public String getGaugeName() { + return gaugeName; + } + + public void setGaugeName(String gaugeName) { + this.gaugeName = gaugeName; + } + @Column(name = "station") public Double getStation() { return station;