Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/SQRelationValue.java @ 3321:a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
flys-backend/trunk@4622 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 07 Jun 2012 09:52:44 +0000 |
parents | |
children | 6b94700ccf05 |
comparison
equal
deleted
inserted
replaced
3320:8f905390c10d | 3321:a2a33eff93aa |
---|---|
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.OneToOne; | |
12 import javax.persistence.GenerationType; | |
13 | |
14 | |
15 @Entity | |
16 @Table(name = "sq_relation_value") | |
17 public class SQRelationValue implements Serializable { | |
18 | |
19 private Integer id; | |
20 | |
21 private SQRelation sqRelation; | |
22 | |
23 private String parameter; | |
24 private String fraction; | |
25 private String function; | |
26 | |
27 private double km; | |
28 private double a; | |
29 private double b; | |
30 | |
31 | |
32 @Id | |
33 @SequenceGenerator( | |
34 name = "SEQUENCE_SQ_VALUE_ID_SEQ", | |
35 sequenceName = "SQ_RELATION_VALUES_ID_SEQ", | |
36 allocationSize = 1) | |
37 @GeneratedValue( | |
38 strategy = GenerationType.SEQUENCE, | |
39 generator = "SEQUENCE_SQ_VALUE_ID_SEQ") | |
40 @Column(name = "id") | |
41 public Integer getId() { | |
42 return id; | |
43 } | |
44 | |
45 public void setId(Integer id) { | |
46 this.id = id; | |
47 } | |
48 | |
49 | |
50 @OneToOne | |
51 @Column(name = "sq_relation_id") | |
52 public SQRelation getSQRelation() { | |
53 return sqRelation; | |
54 } | |
55 | |
56 public void setSQRelation(SQRelation sqRelation) { | |
57 this.sqRelation = sqRelation; | |
58 } | |
59 | |
60 | |
61 @Column(name = "parameter") | |
62 public String getParameter() { | |
63 return parameter; | |
64 } | |
65 | |
66 public void setParameter(String parameter) { | |
67 this.parameter = parameter; | |
68 } | |
69 | |
70 | |
71 @Column(name = "fraction") | |
72 public String getFraction() { | |
73 return fraction; | |
74 } | |
75 | |
76 public void setFraction(String fraction) { | |
77 this.fraction = fraction; | |
78 } | |
79 | |
80 | |
81 @Column(name = "function") | |
82 public String getFunction() { | |
83 return function; | |
84 } | |
85 | |
86 public void setFunction(String function) { | |
87 this.function = function; | |
88 } | |
89 | |
90 | |
91 @Column(name = "km") | |
92 public double getKm() { | |
93 return km; | |
94 } | |
95 | |
96 public void setKm(double km) { | |
97 this.km = km; | |
98 } | |
99 | |
100 | |
101 @Column(name = "a") | |
102 public double getA() { | |
103 return a; | |
104 } | |
105 | |
106 public void setA(double a) { | |
107 this.a = a; | |
108 } | |
109 | |
110 | |
111 @Column(name = "b") | |
112 public double getB() { | |
113 return b; | |
114 } | |
115 | |
116 public void setB(double b) { | |
117 this.b = b; | |
118 } | |
119 } | |
120 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |