comparison src/main/java/de/intevation/lada/model/land/Messwert.java @ 1033:812e0cace5ba schema-update

Added additional attributes to complete the model.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 31 Aug 2016 15:49:40 +0200
parents 1c41c7b8f7c2
children
comparison
equal deleted inserted replaced
1032:1c6c83037b8c 1033:812e0cace5ba
6 import javax.persistence.Column; 6 import javax.persistence.Column;
7 import javax.persistence.Entity; 7 import javax.persistence.Entity;
8 import javax.persistence.GeneratedValue; 8 import javax.persistence.GeneratedValue;
9 import javax.persistence.GenerationType; 9 import javax.persistence.GenerationType;
10 import javax.persistence.Id; 10 import javax.persistence.Id;
11 import javax.persistence.JoinColumn;
12 import javax.persistence.OneToOne;
11 import javax.persistence.Transient; 13 import javax.persistence.Transient;
12 14
13 15
14 /** 16 /**
15 * The persistent class for the messwert database table. 17 * The persistent class for the messwert database table.
47 @Column(name="nwg_zu_messwert") 49 @Column(name="nwg_zu_messwert")
48 private Double nwgZuMesswert; 50 private Double nwgZuMesswert;
49 51
50 @Column(name="tree_modified") 52 @Column(name="tree_modified")
51 private Timestamp treeModified; 53 private Timestamp treeModified;
54
55 @OneToOne
56 @JoinColumn(name="messungs_id", insertable=false, updatable=false)
57 private Messung messung;
52 58
53 @Transient 59 @Transient
54 private boolean owner; 60 private boolean owner;
55 61
56 @Transient 62 @Transient
176 */ 182 */
177 public void setReadonly(boolean readonly) { 183 public void setReadonly(boolean readonly) {
178 this.readonly = readonly; 184 this.readonly = readonly;
179 } 185 }
180 186
181 /**
182 * @return the parentModified
183 */
184 public Timestamp getParentModified() { 187 public Timestamp getParentModified() {
185 return parentModified; 188 if (this.parentModified == null && this.messung != null) {
189 return this.messung.getTreeModified();
190 }
191 return this.parentModified;
186 } 192 }
187 193
188 /**
189 * @param parentModified the parentModified to set
190 */
191 public void setParentModified(Timestamp parentModified) { 194 public void setParentModified(Timestamp parentModified) {
192 this.parentModified = parentModified; 195 this.parentModified = parentModified;
193 } 196 }
194
195 } 197 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)