Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/DischargeTableValue.java @ 3820:8a75cf0841b1 pre2.7-2012-03-16
merged flys-backend/pre2.7-2012-03-16
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:59 +0200 |
parents | d980e545ccab |
children |
comparison
equal
deleted
inserted
replaced
3818:dc18457b1cef | 3820:8a75cf0841b1 |
---|---|
1 package de.intevation.flys.model; | |
2 | |
3 import java.math.BigDecimal; | |
4 | |
5 import java.io.Serializable; | |
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.OneToOne; | |
15 import javax.persistence.JoinColumn; | |
16 | |
17 @Entity | |
18 @Table(name = "discharge_table_values") | |
19 public class DischargeTableValue | |
20 implements Serializable | |
21 { | |
22 private Integer id; | |
23 private DischargeTable dischargeTable; | |
24 private BigDecimal q; | |
25 private BigDecimal w; | |
26 | |
27 public DischargeTableValue() { | |
28 } | |
29 | |
30 public DischargeTableValue( | |
31 DischargeTable dischargeTable, BigDecimal q, BigDecimal w) | |
32 { | |
33 this.dischargeTable = dischargeTable; | |
34 this.q = q; | |
35 this.w = w; | |
36 } | |
37 | |
38 @Id | |
39 @SequenceGenerator( | |
40 name = "SEQUENCE_DISCHARGE_TABLE_VALUES_ID_SEQ", | |
41 sequenceName = "DISCHARGE_TABLE_VALUES_ID_SEQ", | |
42 allocationSize = 1) | |
43 @GeneratedValue( | |
44 strategy = GenerationType.SEQUENCE, | |
45 generator = "SEQUENCE_DISCHARGE_TABLE_VALUES_ID_SEQ") | |
46 @Column(name = "id") | |
47 public Integer getId() { | |
48 return id; | |
49 } | |
50 | |
51 public void setId(Integer id) { | |
52 this.id = id; | |
53 } | |
54 | |
55 @OneToOne | |
56 @JoinColumn(name = "table_id" ) | |
57 public DischargeTable getDischargeTable() { | |
58 return dischargeTable; | |
59 } | |
60 | |
61 public void setDischargeTable(DischargeTable dischargeTable) { | |
62 this.dischargeTable = dischargeTable; | |
63 } | |
64 | |
65 | |
66 @Column(name = "q") | |
67 public BigDecimal getQ() { | |
68 return q; | |
69 } | |
70 | |
71 public void setQ(BigDecimal q) { | |
72 this.q = q; | |
73 } | |
74 | |
75 @Column(name = "w") | |
76 public BigDecimal getW() { | |
77 return w; | |
78 } | |
79 | |
80 public void setW(BigDecimal w) { | |
81 this.w = w; | |
82 } | |
83 } | |
84 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |