Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/Wst.java @ 475:9aa0eddc5221
Add forgotten one to many relation Wst -> WstColumn.
flys-backend/trunk@1721 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 18 Apr 2011 13:34:07 +0000 |
parents | b5ca22aae092 |
children | f834b411ca57 |
comparison
equal
deleted
inserted
replaced
474:5d920695a7f0 | 475:9aa0eddc5221 |
---|---|
11 import javax.persistence.Column; | 11 import javax.persistence.Column; |
12 import javax.persistence.SequenceGenerator; | 12 import javax.persistence.SequenceGenerator; |
13 import javax.persistence.GenerationType; | 13 import javax.persistence.GenerationType; |
14 import javax.persistence.JoinColumn; | 14 import javax.persistence.JoinColumn; |
15 import javax.persistence.OneToOne; | 15 import javax.persistence.OneToOne; |
16 import javax.persistence.OneToMany; | |
16 | 17 |
17 import org.apache.log4j.Logger; | 18 import org.apache.log4j.Logger; |
18 | 19 |
19 import org.hibernate.Session; | 20 import org.hibernate.Session; |
20 import org.hibernate.Query; | 21 import org.hibernate.Query; |
31 | 32 |
32 private Integer id; | 33 private Integer id; |
33 private River river; | 34 private River river; |
34 private String description; | 35 private String description; |
35 private Integer kind; | 36 private Integer kind; |
37 | |
38 private List<WstColumn> columns; | |
36 | 39 |
37 public Wst() { | 40 public Wst() { |
38 } | 41 } |
39 | 42 |
40 public Wst(River river, String description) { | 43 public Wst(River river, String description) { |
90 | 93 |
91 public void setKind(Integer kind) { | 94 public void setKind(Integer kind) { |
92 this.kind = kind; | 95 this.kind = kind; |
93 } | 96 } |
94 | 97 |
98 @OneToMany | |
99 @JoinColumn(name="wst_id") | |
100 public List<WstColumn> getColumns() { | |
101 return columns; | |
102 } | |
103 | |
104 public void setColumns(List<WstColumn> columns) { | |
105 this.columns = columns; | |
106 } | |
95 | 107 |
96 /** | 108 /** |
97 * Determines the min and max Q values of this WST. The min value is placed | 109 * Determines the min and max Q values of this WST. The min value is placed |
98 * in the first field of the resulting array - the max value is placed in | 110 * in the first field of the resulting array - the max value is placed in |
99 * the second field. | 111 * the second field. |