Mercurial > lada > lada-server
comparison src/main/java/de/intevation/lada/model/Messwert.java @ 948:c9b84bca3e3d
Round some values to three digits, breaking ties half to even, before storing.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 23 May 2016 15:49:30 +0200 |
parents | 60648364134e |
children | a51b320a5316 |
comparison
equal
deleted
inserted
replaced
947:0a80f4a87c67 | 948:c9b84bca3e3d |
---|---|
15 import javax.persistence.GenerationType; | 15 import javax.persistence.GenerationType; |
16 import javax.persistence.Id; | 16 import javax.persistence.Id; |
17 import javax.persistence.MappedSuperclass; | 17 import javax.persistence.MappedSuperclass; |
18 import javax.persistence.Table; | 18 import javax.persistence.Table; |
19 import javax.persistence.Transient; | 19 import javax.persistence.Transient; |
20 | |
21 import de.intevation.lada.util.data.MathUtil; | |
20 | 22 |
21 | 23 |
22 /** | 24 /** |
23 * The persistent class for the messwert database table. | 25 * The persistent class for the messwert database table. |
24 */ | 26 */ |
124 public Double getMesswert() { | 126 public Double getMesswert() { |
125 return this.messwert; | 127 return this.messwert; |
126 } | 128 } |
127 | 129 |
128 public void setMesswert(Double messwert) { | 130 public void setMesswert(Double messwert) { |
129 this.messwert = messwert; | 131 this.messwert = MathUtil.roundDoubleToThree(messwert); |
130 } | 132 } |
131 | 133 |
132 public String getMesswertNwg() { | 134 public String getMesswertNwg() { |
133 return this.messwertNwg; | 135 return this.messwertNwg; |
134 } | 136 } |
140 public Double getNwgZuMesswert() { | 142 public Double getNwgZuMesswert() { |
141 return this.nwgZuMesswert; | 143 return this.nwgZuMesswert; |
142 } | 144 } |
143 | 145 |
144 public void setNwgZuMesswert(Double nwgZuMesswert) { | 146 public void setNwgZuMesswert(Double nwgZuMesswert) { |
145 this.nwgZuMesswert = nwgZuMesswert; | 147 this.nwgZuMesswert = MathUtil.roundDoubleToThree(nwgZuMesswert); |
146 } | 148 } |
147 | 149 |
148 public boolean isOwner() { | 150 public boolean isOwner() { |
149 return owner; | 151 return owner; |
150 } | 152 } |