Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/WstColumn.java @ 2877:f0a67bc0e777 2.7
merged flys-backend/2.7
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:31 +0200 |
parents | 3570e4af8cb2 |
children |
comparison
equal
deleted
inserted
replaced
2793:6310b1582f2d | 2877:f0a67bc0e777 |
---|---|
1 package de.intevation.flys.model; | |
2 | |
3 import java.util.List; | |
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.JoinColumn; | |
15 import javax.persistence.OneToOne; | |
16 import javax.persistence.OneToMany; | |
17 | |
18 @Entity | |
19 @Table(name = "wst_columns") | |
20 public class WstColumn | |
21 implements Serializable | |
22 { | |
23 private Integer id; | |
24 private Wst wst; | |
25 private String name; | |
26 private String description; | |
27 private Integer position; | |
28 private TimeInterval timeInterval; | |
29 | |
30 private List<WstColumnQRange> columnQRanges; | |
31 private List<WstColumnValue> columnValues; | |
32 | |
33 public WstColumn() { | |
34 } | |
35 | |
36 public WstColumn( | |
37 Wst wst, | |
38 String name, | |
39 String description, | |
40 Integer position, | |
41 TimeInterval timeInterval | |
42 ) { | |
43 this.wst = wst; | |
44 this.name = name; | |
45 this.description = description; | |
46 this.position = position; | |
47 this.timeInterval = timeInterval; | |
48 } | |
49 | |
50 @Id | |
51 @SequenceGenerator( | |
52 name = "SEQUENCE_WST_COLUMNS_ID_SEQ", | |
53 sequenceName = "WST_COLUMNS_ID_SEQ", | |
54 allocationSize = 1) | |
55 @GeneratedValue( | |
56 strategy = GenerationType.SEQUENCE, | |
57 generator = "SEQUENCE_WST_COLUMNS_ID_SEQ") | |
58 @Column(name = "id") | |
59 public Integer getId() { | |
60 return id; | |
61 } | |
62 | |
63 public void setId(Integer id) { | |
64 this.id = id; | |
65 } | |
66 | |
67 @OneToOne | |
68 @JoinColumn(name = "wst_id" ) | |
69 public Wst getWst() { | |
70 return wst; | |
71 } | |
72 | |
73 public void setWst(Wst wst) { | |
74 this.wst = wst; | |
75 } | |
76 | |
77 @Column(name = "name") | |
78 public String getName() { | |
79 return name; | |
80 } | |
81 | |
82 public void setName(String name) { | |
83 this.name = name; | |
84 } | |
85 | |
86 @Column(name = "description") | |
87 public String getDescription() { | |
88 return description; | |
89 } | |
90 | |
91 public void setDescription(String description) { | |
92 this.description = description; | |
93 } | |
94 | |
95 @Column(name = "position") | |
96 public Integer getPosition() { | |
97 return position; | |
98 } | |
99 | |
100 public void setPosition(Integer position) { | |
101 this.position = position; | |
102 } | |
103 | |
104 @OneToOne | |
105 @JoinColumn(name = "time_interval_id" ) | |
106 public TimeInterval getTimeInterval() { | |
107 return timeInterval; | |
108 } | |
109 | |
110 public void setTimeInterval(TimeInterval timeInterval) { | |
111 this.timeInterval = timeInterval; | |
112 } | |
113 | |
114 @OneToMany | |
115 @JoinColumn(name="wst_column_id") | |
116 public List<WstColumnQRange> getColumnQRanges() { | |
117 return columnQRanges; | |
118 } | |
119 | |
120 public void setColumnQRanges(List<WstColumnQRange> columnQRanges) { | |
121 this.columnQRanges = columnQRanges; | |
122 } | |
123 | |
124 @OneToMany | |
125 @JoinColumn(name="wst_column_id") | |
126 public List<WstColumnValue> getColumnValues() { | |
127 return columnValues; | |
128 } | |
129 | |
130 public void setColumnValues(List<WstColumnValue> columnValues) { | |
131 this.columnValues = columnValues; | |
132 } | |
133 } | |
134 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |