Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/BedHeightSingle.java @ 2809:f283212966e8
Finished work on MINFO bed heights (single).
flys-backend/trunk@4221 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 12 Apr 2012 10:42:46 +0000 |
parents | |
children | bcfdaa3a5bfc |
comparison
equal
deleted
inserted
replaced
2808:b57c95094b68 | 2809:f283212966e8 |
---|---|
1 package de.intevation.flys.model; | |
2 | |
3 import java.io.Serializable; | |
4 | |
5 import java.util.List; | |
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.JoinColumn; | |
15 import javax.persistence.OneToOne; | |
16 import javax.persistence.OneToMany; | |
17 | |
18 | |
19 @Entity | |
20 @Table(name = "bed_height_single") | |
21 public class BedHeightSingle implements Serializable { | |
22 | |
23 private Integer id; | |
24 private Integer year; | |
25 private Integer soundingWidth; | |
26 | |
27 private String evaluationBy; | |
28 private String description; | |
29 | |
30 private River river; | |
31 | |
32 private BedHeightType type; | |
33 | |
34 private LocationSystem locationSystem; | |
35 | |
36 private ElevationModel curElevationModel; | |
37 | |
38 private ElevationModel oldElevationModel; | |
39 | |
40 private Range range; | |
41 | |
42 private List<BedHeightSingleValue> values; | |
43 | |
44 | |
45 public BedHeightSingle() { | |
46 } | |
47 | |
48 | |
49 public BedHeightSingle( | |
50 River river, | |
51 Integer year, | |
52 Integer soundingWidth, | |
53 BedHeightType type, | |
54 LocationSystem locationSystem, | |
55 ElevationModel curElevationModel, | |
56 Range range | |
57 ) { | |
58 this( | |
59 river, | |
60 year, | |
61 soundingWidth, | |
62 type, | |
63 locationSystem, | |
64 curElevationModel, | |
65 null, | |
66 range, | |
67 null, | |
68 null); | |
69 } | |
70 | |
71 | |
72 public BedHeightSingle( | |
73 River river, | |
74 Integer year, | |
75 Integer soundingWidth, | |
76 BedHeightType type, | |
77 LocationSystem locationSystem, | |
78 ElevationModel curElevationModel, | |
79 ElevationModel oldElevationModel, | |
80 Range range, | |
81 String evaluationBy, | |
82 String description | |
83 ) { | |
84 this.river = river; | |
85 this.year = year; | |
86 this.soundingWidth = soundingWidth; | |
87 this.type = type; | |
88 this.locationSystem = locationSystem; | |
89 this.curElevationModel = curElevationModel; | |
90 this.oldElevationModel = oldElevationModel; | |
91 this.range = range; | |
92 this.evaluationBy = evaluationBy; | |
93 this.description = description; | |
94 } | |
95 | |
96 | |
97 @Id | |
98 @SequenceGenerator( | |
99 name = "SEQUENCE_BED_HEIGHT_SINGLE_ID_SEQ", | |
100 sequenceName = "BED_HEIGHT_SINGLE_ID_SEQ", | |
101 allocationSize = 1) | |
102 @GeneratedValue( | |
103 strategy = GenerationType.SEQUENCE, | |
104 generator = "SEQUENCE_BED_HEIGHT_SINGLE_ID_SEQ") | |
105 @Column(name = "id") | |
106 public Integer getId() { | |
107 return id; | |
108 } | |
109 | |
110 public void setId(Integer id) { | |
111 this.id = id; | |
112 } | |
113 | |
114 @OneToOne | |
115 @JoinColumn(name = "river_id" ) | |
116 public River getRiver() { | |
117 return river; | |
118 } | |
119 | |
120 public void setRiver(River river) { | |
121 this.river = river; | |
122 } | |
123 | |
124 @Column(name = "year") | |
125 public Integer getYear() { | |
126 return year; | |
127 } | |
128 | |
129 public void setYear(Integer year) { | |
130 this.year = year; | |
131 } | |
132 | |
133 @Column(name = "sounding_width") | |
134 public Integer getSoundingWidth() { | |
135 return soundingWidth; | |
136 } | |
137 | |
138 public void setSoundingWidth(Integer soundingWidth) { | |
139 this.soundingWidth = soundingWidth; | |
140 } | |
141 | |
142 @OneToOne | |
143 @JoinColumn(name = "type_id") | |
144 public BedHeightType getType() { | |
145 return type; | |
146 } | |
147 | |
148 public void setType(BedHeightType type) { | |
149 this.type = type; | |
150 } | |
151 | |
152 @OneToOne | |
153 @JoinColumn(name = "location_system_id") | |
154 public LocationSystem getLocationSystem() { | |
155 return locationSystem; | |
156 } | |
157 | |
158 public void setLocationSystem(LocationSystem locationSystem) { | |
159 this.locationSystem = locationSystem; | |
160 } | |
161 | |
162 @OneToOne | |
163 @JoinColumn(name = "cur_elevation_model_id") | |
164 public ElevationModel getCurElevationModel() { | |
165 return curElevationModel; | |
166 } | |
167 | |
168 public void setCurElevationModel(ElevationModel curElevationModel) { | |
169 this.curElevationModel = curElevationModel; | |
170 } | |
171 | |
172 @OneToOne | |
173 @JoinColumn(name = "old_elevation_model_id") | |
174 public ElevationModel getOldElevationModel() { | |
175 return oldElevationModel; | |
176 } | |
177 | |
178 public void setOldElevationModel(ElevationModel oldElevationModel) { | |
179 this.oldElevationModel = oldElevationModel; | |
180 } | |
181 | |
182 @OneToOne | |
183 @JoinColumn(name = "range_id") | |
184 public Range getRange() { | |
185 return range; | |
186 } | |
187 | |
188 public void setRange(Range range) { | |
189 this.range = range; | |
190 } | |
191 | |
192 @Column(name = "evaluation_by") | |
193 public String getEvaluationBy() { | |
194 return evaluationBy; | |
195 } | |
196 | |
197 public void setEvaluationBy(String evaluationBy) { | |
198 this.evaluationBy = evaluationBy; | |
199 } | |
200 | |
201 @Column(name = "description") | |
202 public String getDescription() { | |
203 return description; | |
204 } | |
205 | |
206 public void setDescription(String description) { | |
207 this.description = description; | |
208 } | |
209 | |
210 @OneToMany | |
211 @JoinColumn(name = "bed_height_single_id") | |
212 public List<BedHeightSingleValue> getValues() { | |
213 return values; | |
214 } | |
215 | |
216 public void setValues(List<BedHeightSingleValue> values) { | |
217 this.values = values; | |
218 } | |
219 } | |
220 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |