Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationRecord.java @ 8412:17db08570637
SCHEMA CHANGE: removed superfluous columns station and river_id from measurement_stations and adapted other components accordingly.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 15 Oct 2014 19:20:26 +0200 |
parents | c702bac7f72e |
children | 71144e25a6c9 |
comparison
equal
deleted
inserted
replaced
8411:b8c6cb36607e | 8412:17db08570637 |
---|---|
41 this.setLink(link); | 41 this.setLink(link); |
42 this.setLinkText(MSG.measurement_station_info_link()); | 42 this.setLinkText(MSG.measurement_station_info_link()); |
43 this.setCurveLink(MSG.static_sqrelation()); | 43 this.setCurveLink(MSG.static_sqrelation()); |
44 this.setID(number); | 44 this.setID(number); |
45 this.setName(station.getName()); | 45 this.setName(station.getName()); |
46 if (station.isKmUp()) { | 46 this.setKmEnd(station.getKmEnd()); |
47 this.setKmEnd(station.getKmStart()); | 47 this.setKmStart(station.getKmStart()); |
48 this.setKmStart(station.getKmEnd()); | |
49 } | |
50 else { | |
51 this.setKmEnd(station.getKmEnd()); | |
52 this.setKmStart(station.getKmStart()); | |
53 } | |
54 this.setKmUp(station.isKmUp()); | |
55 this.setRiverName(station.getRiverName()); | 48 this.setRiverName(station.getRiverName()); |
56 this.setStation(station.getStation()); | |
57 this.setGaugeName(station.getGaugeName()); | 49 this.setGaugeName(station.getGaugeName()); |
58 this.setMeasurementType(station.getMeasurementType()); | 50 this.setMeasurementType(station.getMeasurementType()); |
59 this.setOperator(station.getOperator()); | 51 this.setOperator(station.getOperator()); |
60 this.setRiverSide(station.getRiverSide()); | 52 this.setRiverSide(station.getRiverSide()); |
61 this.setStartTime(station.getStartTime()); | 53 this.setStartTime(station.getStartTime()); |
94 return this.getAttributeAsDouble("kmend"); | 86 return this.getAttributeAsDouble("kmend"); |
95 } | 87 } |
96 | 88 |
97 private void setKmEnd(Double value) { | 89 private void setKmEnd(Double value) { |
98 this.setAttribute("kmend", value); | 90 this.setAttribute("kmend", value); |
99 } | |
100 | |
101 @Override | |
102 public boolean isKmUp() { | |
103 return this.getAttributeAsBoolean("kmup"); | |
104 } | |
105 | |
106 private void setKmUp(boolean value) { | |
107 this.setAttribute("kmup", value); | |
108 } | |
109 | |
110 @Override | |
111 public Double getStation() { | |
112 return this.getAttributeAsDouble("station"); | |
113 } | |
114 | |
115 private void setStation(Double station) { | |
116 this.setAttribute("station", station); | |
117 } | 91 } |
118 | 92 |
119 @Override | 93 @Override |
120 public String getRiverName() { | 94 public String getRiverName() { |
121 return this.getAttributeAsString("rivername"); | 95 return this.getAttributeAsString("rivername"); |