comparison flys-backend/src/main/java/de/intevation/flys/model/CrossSectionLine.java @ 2860:2f874d14ac68

Use Doubles to store meassure points of profiles. flys-backend/trunk@4325 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 02 May 2012 08:49:57 +0000
parents e237a08acf6e
children 2ae732e2c65c
comparison
equal deleted inserted replaced
2859:ed13816047b3 2860:2f874d14ac68
1 package de.intevation.flys.model; 1 package de.intevation.flys.model;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
4
5 import java.math.BigDecimal;
6 4
7 import java.util.ArrayList; 5 import java.util.ArrayList;
8 import java.util.List; 6 import java.util.List;
9 import java.util.Collections; 7 import java.util.Collections;
10 import java.util.Comparator; 8 import java.util.Comparator;
35 33
36 public static final double TOO_SMALL = 0.2; 34 public static final double TOO_SMALL = 0.2;
37 public static final double TOO_BIG = 500; 35 public static final double TOO_BIG = 500;
38 36
39 private Integer id; 37 private Integer id;
40 private BigDecimal km; 38 private Double km;
41 private CrossSection crossSection; 39 private CrossSection crossSection;
42 40
43 private List<CrossSectionPoint> points; 41 private List<CrossSectionPoint> points;
44 42
45 public static final Comparator<CrossSectionPoint> COL_POS_CMP = 43 public static final Comparator<CrossSectionPoint> COL_POS_CMP =
68 66
69 67
70 public CrossSectionLine() { 68 public CrossSectionLine() {
71 } 69 }
72 70
73 public CrossSectionLine(CrossSection crossSection, BigDecimal km) { 71 public CrossSectionLine(CrossSection crossSection, Double km) {
74 this.crossSection = crossSection; 72 this.crossSection = crossSection;
75 this.km = km; 73 this.km = km;
76 } 74 }
77 75
78 @Id 76 @Id
91 public void setId(Integer id) { 89 public void setId(Integer id) {
92 this.id = id; 90 this.id = id;
93 } 91 }
94 92
95 @Column(name = "km") 93 @Column(name = "km")
96 public BigDecimal getKm() { 94 public Double getKm() {
97 return km; 95 return km;
98 } 96 }
99 97
100 public void setKm(BigDecimal km) { 98 public void setKm(Double km) {
101 this.km = km; 99 this.km = km;
102 } 100 }
103 101
104 @OneToOne 102 @OneToOne
105 @JoinColumn(name = "cross_section_id") 103 @JoinColumn(name = "cross_section_id")

http://dive4elements.wald.intevation.org