Mercurial > dive4elements > river
diff backend/src/main/java/org/dive4elements/river/model/BedHeightSingleValue.java @ 6200:53fca3392c9f
Schema change and Importer: use double to prevent rounding at import time
author | Tom Gottfried <tom.gottfried@intevation.de> |
---|---|
date | Fri, 24 May 2013 16:03:52 +0200 |
parents | 4c3ccf2b0304 |
children | dc166b225775 |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/model/BedHeightSingleValue.java Fri May 24 13:57:40 2013 +0200 +++ b/backend/src/main/java/org/dive4elements/river/model/BedHeightSingleValue.java Fri May 24 16:03:52 2013 +0200 @@ -43,12 +43,12 @@ private BedHeightSingle bedHeight; - private BigDecimal station; - private BigDecimal height; - private BigDecimal uncertainty; - private BigDecimal dataGap; + private Double station; + private Double height; + private Double uncertainty; + private Double dataGap; private BigDecimal soundingWidth; - private BigDecimal width; + private Double width; public BedHeightSingleValue() { @@ -56,12 +56,12 @@ public BedHeightSingleValue( BedHeightSingle bedHeight, - BigDecimal station, - BigDecimal height, - BigDecimal uncertainty, - BigDecimal dataGap, + Double station, + Double height, + Double uncertainty, + Double dataGap, BigDecimal soundingWidth, - BigDecimal width + Double width ) { this.bedHeight = bedHeight; this.station = station; @@ -100,38 +100,38 @@ } @Column(name = "station") - public BigDecimal getStation() { + public Double getStation() { return station; } - public void setStation(BigDecimal station) { + public void setStation(Double station) { this.station = station; } @Column(name = "height") - public BigDecimal getHeight() { + public Double getHeight() { return height; } - public void setHeight(BigDecimal height) { + public void setHeight(Double height) { this.height = height; } @Column(name="uncertainty") - public BigDecimal getUncertainty() { + public Double getUncertainty() { return uncertainty; } - public void setUncertainty(BigDecimal uncertainty) { + public void setUncertainty(Double uncertainty) { this.uncertainty = uncertainty; } @Column(name="data_gap") - public BigDecimal getDataGap() { + public Double getDataGap() { return dataGap; } - public void setDataGap(BigDecimal dataGap) { + public void setDataGap(Double dataGap) { this.dataGap = dataGap; } @@ -145,11 +145,11 @@ } @Column(name="width") - public BigDecimal getWidth() { + public Double getWidth() { return width; } - public void setWidth(BigDecimal width) { + public void setWidth(Double width) { this.width = width; } @@ -166,8 +166,8 @@ " and station >= :kmLo and station <= :kmHi"); query.setParameter("single", single); - query.setParameter("kmLo", new BigDecimal(kmLo)); - query.setParameter("kmHi", new BigDecimal(kmHi)); + query.setParameter("kmLo", new Double(kmLo)); + query.setParameter("kmHi", new Double(kmHi)); return query.list(); }