Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/WstColumnValue.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 | 29a408f80a89 |
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 = "wst_column_values") | |
19 public class WstColumnValue | |
20 implements Serializable | |
21 { | |
22 private Integer id; | |
23 private WstColumn wstColumn; | |
24 private BigDecimal position; | |
25 private BigDecimal w; | |
26 | |
27 public WstColumnValue() { | |
28 } | |
29 | |
30 public WstColumnValue( | |
31 WstColumn wstColumn, | |
32 BigDecimal position, | |
33 BigDecimal w | |
34 ) { | |
35 this.wstColumn = wstColumn; | |
36 this.position = position; | |
37 this.w = w; | |
38 } | |
39 | |
40 @Id | |
41 @SequenceGenerator( | |
42 name = "SEQUENCE_WST_COLUMN_VALUES_ID_SEQ", | |
43 sequenceName = "WST_COLUMN_VALUES_ID_SEQ", | |
44 allocationSize = 1) | |
45 @GeneratedValue( | |
46 strategy = GenerationType.SEQUENCE, | |
47 generator = "SEQUENCE_WST_COLUMN_VALUES_ID_SEQ") | |
48 @Column(name = "id") | |
49 public Integer getId() { | |
50 return id; | |
51 } | |
52 | |
53 public void setId(Integer id) { | |
54 this.id = id; | |
55 } | |
56 | |
57 @OneToOne | |
58 @JoinColumn(name = "wst_column_id") | |
59 public WstColumn getWstColumn() { | |
60 return wstColumn; | |
61 } | |
62 | |
63 public void setWstColumn(WstColumn wstColumn) { | |
64 this.wstColumn = wstColumn; | |
65 } | |
66 | |
67 @Column(name = "position") // FIXME: type mapping needed? | |
68 public BigDecimal getPosition() { | |
69 return position; | |
70 } | |
71 | |
72 public void setPosition(BigDecimal position) { | |
73 this.position = position; | |
74 } | |
75 | |
76 @Column(name = "w") // FIXME: type mapping needed? | |
77 public BigDecimal getW() { | |
78 return w; | |
79 } | |
80 | |
81 public void setW(BigDecimal w) { | |
82 this.w = w; | |
83 } | |
84 } | |
85 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |