comparison flys-backend/src/main/java/de/intevation/flys/model/CrossSectionPoint.java @ 2877:f0a67bc0e777 2.7

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

http://dive4elements.wald.intevation.org