comparison flys-backend/src/main/java/de/intevation/flys/model/CrossSection.java @ 1203:3c01bef43a98

Querprofile: Added a table to map the points to a given km. flys-backend/trunk@2308 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 07 Jul 2011 15:59:24 +0000
parents 44581b40b968
children 22858e7cca79
comparison
equal deleted inserted replaced
1202:44581b40b968 1203:3c01bef43a98
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.List; 5 import java.util.List;
8 6
9 import javax.persistence.Entity; 7 import javax.persistence.Entity;
10 import javax.persistence.Id; 8 import javax.persistence.Id;
20 @Entity 18 @Entity
21 @Table(name = "cross_sections") 19 @Table(name = "cross_sections")
22 public class CrossSection 20 public class CrossSection
23 implements Serializable 21 implements Serializable
24 { 22 {
25 private Integer id; 23 private Integer id;
26 private BigDecimal km; 24 private River river;
27 private River river; 25 private TimeInterval timeInterval;
28 private TimeInterval timeInterval; 26 private String description;
29 private String description; 27 private List<CrossSectionLine> lines;
30 private List<CrossSectionPoint> points;
31 28
32 public CrossSection() { 29 public CrossSection() {
33 } 30 }
34 31
35 @Id 32 @Id
45 return id; 42 return id;
46 } 43 }
47 44
48 public void setId(Integer id) { 45 public void setId(Integer id) {
49 this.id = id; 46 this.id = id;
50 }
51
52 @Column(name = "x")
53 public BigDecimal getKm() {
54 return km;
55 }
56
57 public void setKm(BigDecimal km) {
58 this.km = km;
59 } 47 }
60 48
61 @OneToOne 49 @OneToOne
62 @JoinColumn(name = "river_id") 50 @JoinColumn(name = "river_id")
63 public River getRiver() { 51 public River getRiver() {
87 this.description = description; 75 this.description = description;
88 } 76 }
89 77
90 @OneToMany 78 @OneToMany
91 @JoinColumn(name="cross_section_id") 79 @JoinColumn(name="cross_section_id")
92 public List<CrossSectionPoint> getPoints() { 80 public List<CrossSectionLine> getLines() {
93 return points; 81 return lines;
94 } 82 }
95 83
96 public void setPoints(List<CrossSectionPoint> points) { 84 public void setLines(List<CrossSectionLine> lines) {
97 this.points = points; 85 this.lines = lines;
98 } 86 }
99 } 87 }
100 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 88 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org