# HG changeset patch # User Raimund Renkert # Date 1364385713 -3600 # Node ID 1b676aefaf3ae1b9d2e40b7d528e68381739fcbd # Parent e47c4e9b050edc8a6e02513d4e2e5c1e2bf5f97b Added gauge name to measurement station parser and model. diff -r e47c4e9b050e -r 1b676aefaf3a flys-backend/src/main/java/de/intevation/flys/importer/ImportMeasurementStation.java --- 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); } diff -r e47c4e9b050e -r 1b676aefaf3a flys-backend/src/main/java/de/intevation/flys/model/MeasurementStation.java --- 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;