comparison flys-backend/src/main/java/de/intevation/flys/model/Wst.java @ 2347:0acf28a3d28a

Removed the Unit from Wsts - added a WstUnit column to rivers. flys-backend/trunk@2884 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 04 Oct 2011 15:28:19 +0000
parents f834b411ca57
children 027736510a30
comparison
equal deleted inserted replaced
2346:f834b411ca57 2347:0acf28a3d28a
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;
38 37
39 private List<WstColumn> columns; 38 private List<WstColumn> columns;
40 39
41 public Wst() { 40 public Wst() {
42 } 41 }
43 42
44 public Wst(River river, String description) { 43 public Wst(River river, String description) {
45 this(river, description, 0, null); 44 this(river, description, 0);
46 } 45 }
47 46
48 public Wst(River river, String description, Integer kind, Unit unit) { 47 public Wst(River river, String description, Integer kind) {
49 this.river = river; 48 this.river = river;
50 this.description = description; 49 this.description = description;
51 this.kind = kind; 50 this.kind = kind;
52 this.unit = unit;
53 } 51 }
54 52
55 @Id 53 @Id
56 @SequenceGenerator( 54 @SequenceGenerator(
57 name = "SEQUENCE_WSTS_ID_SEQ", 55 name = "SEQUENCE_WSTS_ID_SEQ",
106 public void setColumns(List<WstColumn> columns) { 104 public void setColumns(List<WstColumn> columns) {
107 this.columns = columns; 105 this.columns = columns;
108 } 106 }
109 107
110 108
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
121 /** 109 /**
122 * Determines the min and max Q values of this WST. The min value is placed 110 * Determines the min and max Q values of this WST. The min value is placed
123 * in the first field of the resulting array - the max value is placed in 111 * in the first field of the resulting array - the max value is placed in
124 * the second field. 112 * the second field.
125 * 113 *

http://dive4elements.wald.intevation.org