Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/Wst.java @ 2346:f834b411ca57
Added db table, model class and importer stuff for units.
flys-backend/trunk@2877 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 04 Oct 2011 06:47:00 +0000 |
parents | 9aa0eddc5221 |
children | 0acf28a3d28a |
comparison
equal
deleted
inserted
replaced
2345:c3ea91aee989 | 2346:f834b411ca57 |
---|---|
32 | 32 |
33 private Integer id; | 33 private Integer id; |
34 private River river; | 34 private River river; |
35 private String description; | 35 private String description; |
36 private Integer kind; | 36 private Integer kind; |
37 private Unit unit; | |
37 | 38 |
38 private List<WstColumn> columns; | 39 private List<WstColumn> columns; |
39 | 40 |
40 public Wst() { | 41 public Wst() { |
41 } | 42 } |
42 | 43 |
43 public Wst(River river, String description) { | 44 public Wst(River river, String description) { |
44 this(river, description, 0); | 45 this(river, description, 0, null); |
45 } | 46 } |
46 | 47 |
47 public Wst(River river, String description, Integer kind) { | 48 public Wst(River river, String description, Integer kind, Unit unit) { |
48 this.river = river; | 49 this.river = river; |
49 this.description = description; | 50 this.description = description; |
50 this.kind = kind; | 51 this.kind = kind; |
52 this.unit = unit; | |
51 } | 53 } |
52 | 54 |
53 @Id | 55 @Id |
54 @SequenceGenerator( | 56 @SequenceGenerator( |
55 name = "SEQUENCE_WSTS_ID_SEQ", | 57 name = "SEQUENCE_WSTS_ID_SEQ", |
103 | 105 |
104 public void setColumns(List<WstColumn> columns) { | 106 public void setColumns(List<WstColumn> columns) { |
105 this.columns = columns; | 107 this.columns = columns; |
106 } | 108 } |
107 | 109 |
110 | |
111 @OneToOne | |
112 @JoinColumn(name = "unit_id" ) | |
113 public Unit getUnit() { | |
114 return unit; | |
115 } | |
116 | |
117 public void setUnit(Unit unit) { | |
118 this.unit = unit; | |
119 } | |
120 | |
108 /** | 121 /** |
109 * Determines the min and max Q values of this WST. The min value is placed | 122 * Determines the min and max Q values of this WST. The min value is placed |
110 * in the first field of the resulting array - the max value is placed in | 123 * in the first field of the resulting array - the max value is placed in |
111 * the second field. | 124 * the second field. |
112 * | 125 * |