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