Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/CrossSectionPoint.java @ 3820:8a75cf0841b1 pre2.7-2012-03-16
merged flys-backend/pre2.7-2012-03-16
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:59 +0200 |
parents | 22858e7cca79 |
children | 2f874d14ac68 |
comparison
equal
deleted
inserted
replaced
3818:dc18457b1cef | 3820:8a75cf0841b1 |
---|---|
1 package de.intevation.flys.model; | |
2 | |
3 import java.math.BigDecimal; | |
4 | |
5 import java.io.Serializable; | |
6 | |
7 import javax.persistence.Entity; | |
8 import javax.persistence.Id; | |
9 import javax.persistence.Table; | |
10 import javax.persistence.GeneratedValue; | |
11 import javax.persistence.Column; | |
12 import javax.persistence.SequenceGenerator; | |
13 import javax.persistence.GenerationType; | |
14 import javax.persistence.OneToOne; | |
15 import javax.persistence.JoinColumn; | |
16 | |
17 @Entity | |
18 @Table(name = "cross_section_points") | |
19 public class CrossSectionPoint | |
20 implements Serializable | |
21 { | |
22 private Integer id; | |
23 private CrossSectionLine crossSectionLine; | |
24 private Integer colPos; | |
25 private BigDecimal x; | |
26 private BigDecimal y; | |
27 | |
28 public CrossSectionPoint() { | |
29 } | |
30 | |
31 public CrossSectionPoint( | |
32 CrossSectionLine crossSectionLine, | |
33 Integer colPos, | |
34 BigDecimal x, | |
35 BigDecimal y | |
36 ) { | |
37 this.crossSectionLine = crossSectionLine; | |
38 this.colPos = colPos; | |
39 this.x = x; | |
40 this.y = y; | |
41 } | |
42 | |
43 @Id | |
44 @SequenceGenerator( | |
45 name = "SEQUENCE_CROSS_SECTION_POINTS_ID_SEQ", | |
46 sequenceName = "CROSS_SECTION_POINTS_ID_SEQ", | |
47 allocationSize = 1) | |
48 @GeneratedValue( | |
49 strategy = GenerationType.SEQUENCE, | |
50 generator = "SEQUENCE_CROSS_SECTION_POINTS_ID_SEQ") | |
51 @Column(name = "id") | |
52 public Integer getId() { | |
53 return id; | |
54 } | |
55 | |
56 public void setId(Integer id) { | |
57 this.id = id; | |
58 } | |
59 | |
60 @OneToOne | |
61 @JoinColumn(name = "cross_section_line_id") | |
62 public CrossSectionLine getCrossSectionLine() { | |
63 return crossSectionLine; | |
64 } | |
65 | |
66 public void setCrossSectionLine(CrossSectionLine crossSectionLine) { | |
67 this.crossSectionLine = crossSectionLine; | |
68 } | |
69 | |
70 @Column(name = "col_pos") | |
71 public Integer getColPos() { | |
72 return colPos; | |
73 } | |
74 | |
75 public void setColPos(Integer colPos) { | |
76 this.colPos = colPos; | |
77 } | |
78 | |
79 @Column(name = "x") | |
80 public BigDecimal getX() { | |
81 return x; | |
82 } | |
83 | |
84 public void setX(BigDecimal x) { | |
85 this.x = x; | |
86 } | |
87 | |
88 @Column(name = "y") | |
89 public BigDecimal getY() { | |
90 return y; | |
91 } | |
92 | |
93 public void setY(BigDecimal y) { | |
94 this.y = y; | |
95 } | |
96 } | |
97 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |