Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/MorphologicalWidthValue.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 | 0c2567626754 |
children |
comparison
equal
deleted
inserted
replaced
2793:6310b1582f2d | 2877:f0a67bc0e777 |
---|---|
1 package de.intevation.flys.model; | |
2 | |
3 import java.io.Serializable; | |
4 import java.math.BigDecimal; | |
5 | |
6 import javax.persistence.Entity; | |
7 import javax.persistence.Id; | |
8 import javax.persistence.Table; | |
9 import javax.persistence.GeneratedValue; | |
10 import javax.persistence.Column; | |
11 import javax.persistence.SequenceGenerator; | |
12 import javax.persistence.GenerationType; | |
13 import javax.persistence.JoinColumn; | |
14 import javax.persistence.OneToOne; | |
15 | |
16 | |
17 @Entity | |
18 @Table(name = "morphologic_width_values") | |
19 public class MorphologicalWidthValue implements Serializable { | |
20 | |
21 private Integer id; | |
22 | |
23 private MorphologicalWidth morphologicalWidth; | |
24 | |
25 private BigDecimal station; | |
26 private BigDecimal width; | |
27 | |
28 private String description; | |
29 | |
30 | |
31 public MorphologicalWidthValue() { | |
32 } | |
33 | |
34 | |
35 public MorphologicalWidthValue( | |
36 MorphologicalWidth morphologicalWidth, | |
37 BigDecimal station, | |
38 BigDecimal width, | |
39 String description | |
40 ) { | |
41 this.morphologicalWidth = morphologicalWidth; | |
42 this.station = station; | |
43 this.width = width; | |
44 this.description = description; | |
45 } | |
46 | |
47 | |
48 @Id | |
49 @SequenceGenerator( | |
50 name = "SEQUENCE_MORPH_WIDTH_VALUES_ID_SEQ", | |
51 sequenceName = "MORPH_WIDTH_VALUES_ID_SEQ", | |
52 allocationSize = 1) | |
53 @GeneratedValue( | |
54 strategy = GenerationType.SEQUENCE, | |
55 generator = "SEQUENCE_MORPH_WIDTH_VALUES_ID_SEQ") | |
56 @Column(name = "id") | |
57 public Integer getId() { | |
58 return id; | |
59 } | |
60 | |
61 public void setId(Integer id) { | |
62 this.id = id; | |
63 } | |
64 | |
65 | |
66 @OneToOne | |
67 @JoinColumn(name = "morphologic_width_id") | |
68 public MorphologicalWidth getMorphologicalWidth() { | |
69 return morphologicalWidth; | |
70 } | |
71 | |
72 public void setMorphologicalWidth(MorphologicalWidth width) { | |
73 this.morphologicalWidth = width; | |
74 } | |
75 | |
76 @Column(name = "station") | |
77 public BigDecimal getStation() { | |
78 return station; | |
79 } | |
80 | |
81 public void setStation(BigDecimal station) { | |
82 this.station = station; | |
83 } | |
84 | |
85 @Column(name = "width") | |
86 public BigDecimal getWidth() { | |
87 return width; | |
88 } | |
89 | |
90 public void setWidth(BigDecimal width) { | |
91 this.width = width; | |
92 } | |
93 | |
94 @Column(name = "description") | |
95 public String getDescription() { | |
96 return description; | |
97 } | |
98 | |
99 public void setDescription(String description) { | |
100 this.description = description; | |
101 } | |
102 } | |
103 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |