Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/FlowVelocityModelValue.java @ 2825:a948366d8ac5
Added new model classes for MINFO specific flow velocity.
flys-backend/trunk@4242 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 17 Apr 2012 06:36:39 +0000 |
parents | |
children | ac13e466a55e |
comparison
equal
deleted
inserted
replaced
2824:85b2b5e7377f | 2825:a948366d8ac5 |
---|---|
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 import org.apache.log4j.Logger; | |
17 | |
18 | |
19 @Entity | |
20 @Table(name = "flow_velocity_model_values") | |
21 public class FlowVelocityModelValue | |
22 implements Serializable | |
23 { | |
24 private static Logger logger = | |
25 Logger.getLogger(FlowVelocityModelValue.class); | |
26 | |
27 | |
28 private Integer id; | |
29 | |
30 private FlowVelocityModel flowVelocity; | |
31 | |
32 private BigDecimal station; | |
33 private BigDecimal totalChannel; | |
34 private BigDecimal mainChannel; | |
35 private BigDecimal shearStress; | |
36 | |
37 | |
38 public FlowVelocityModelValue() { | |
39 } | |
40 | |
41 | |
42 public FlowVelocityModelValue( | |
43 FlowVelocityModel flowVelocity, | |
44 BigDecimal station, | |
45 BigDecimal totalChannel, | |
46 BigDecimal mainChannel, | |
47 BigDecimal shearStress | |
48 ) { | |
49 this.flowVelocity = flowVelocity; | |
50 this.station = station; | |
51 this.totalChannel = totalChannel; | |
52 this.mainChannel = mainChannel; | |
53 this.shearStress = shearStress; | |
54 } | |
55 | |
56 @Id | |
57 @SequenceGenerator( | |
58 name = "SEQUENCE_FLOW_VELOCITY_M_VALUES_ID_SEQ", | |
59 sequenceName = "FLOW_VELOCITY_M_VALUES_ID_SEQ", | |
60 allocationSize = 1) | |
61 @GeneratedValue( | |
62 strategy = GenerationType.SEQUENCE, | |
63 generator = "SEQUENCE_FLOW_VELOCITY_M_VALUES_ID_SEQ") | |
64 @Column(name = "id") | |
65 public Integer getId() { | |
66 return id; | |
67 } | |
68 | |
69 public void setId(Integer id) { | |
70 this.id = id; | |
71 } | |
72 | |
73 @OneToOne | |
74 @JoinColumn(name = "flow_velocity_model_id") | |
75 public FlowVelocityModel getFlowVelocity() { | |
76 return flowVelocity; | |
77 } | |
78 | |
79 public void setFlowVelocity(FlowVelocityModel flowVelocity) { | |
80 this.flowVelocity = flowVelocity; | |
81 } | |
82 | |
83 @Column(name = "station") | |
84 public BigDecimal getStation() { | |
85 return station; | |
86 } | |
87 | |
88 public void setStation(BigDecimal station) { | |
89 this.station = station; | |
90 } | |
91 | |
92 @Column(name = "total_channel") | |
93 public BigDecimal getTotalChannel() { | |
94 return totalChannel; | |
95 } | |
96 | |
97 public void setTotalChannel(BigDecimal totalChannel) { | |
98 this.totalChannel = totalChannel; | |
99 } | |
100 | |
101 @Column(name = "main_channel") | |
102 public BigDecimal getMainChannel() { | |
103 return mainChannel; | |
104 } | |
105 | |
106 public void setMainChannel(BigDecimal mainChannel) { | |
107 this.mainChannel = mainChannel; | |
108 } | |
109 | |
110 @Column(name = "shear_stress") | |
111 public BigDecimal getShearStress() { | |
112 return shearStress; | |
113 } | |
114 | |
115 public void setShearStress(BigDecimal shearStress) { | |
116 this.shearStress = shearStress; | |
117 } | |
118 } | |
119 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |