comparison src/main/java/de/intevation/lada/model/land/Messung.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 61354a9fa58d
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 messung database table. 17 * The persistent class for the messung database table.
44 private String nebenprobenNr; 46 private String nebenprobenNr;
45 47
46 @Column(name="probe_id") 48 @Column(name="probe_id")
47 private Integer probeId; 49 private Integer probeId;
48 50
51 @OneToOne
52 @JoinColumn(name="probe_id", insertable=false, updatable=false)
53 private Probe probe;
54
49 private Integer status; 55 private Integer status;
50 56
51 @Column(name="tree_modified") 57 @Column(name="tree_modified")
52 private Timestamp treeModified; 58 private Timestamp treeModified;
53 59
178 184
179 /** 185 /**
180 * @return the parentModified 186 * @return the parentModified
181 */ 187 */
182 public Timestamp getParentModified() { 188 public Timestamp getParentModified() {
189 if (this.parentModified == null && this.probe != null) {
190 return this.probe.getTreeModified();
191 }
183 return parentModified; 192 return parentModified;
184 } 193 }
185 194
186 /** 195 /**
187 * @param parentModified the parentModified to set 196 * @param parentModified the parentModified to set
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)