Mercurial > lada > lada-server
comparison src/main/java/de/intevation/lada/model/land/ZusatzWert.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.Table; | 13 import javax.persistence.Table; |
12 import javax.persistence.Transient; | 14 import javax.persistence.Transient; |
13 | 15 |
14 | 16 |
15 /** | 17 /** |
43 private String pzsId; | 45 private String pzsId; |
44 | 46 |
45 @Column(name="tree_modified") | 47 @Column(name="tree_modified") |
46 private Timestamp treeModified; | 48 private Timestamp treeModified; |
47 | 49 |
50 @OneToOne | |
51 @JoinColumn(name="probe_id", insertable=false, updatable=false) | |
52 private Probe probe; | |
53 | |
48 @Transient | 54 @Transient |
49 private boolean owner; | 55 private boolean owner; |
50 | 56 |
51 @Transient | 57 @Transient |
52 private boolean readonly; | 58 private boolean readonly; |
59 | |
60 @Transient | |
61 private Timestamp parentModified; | |
53 | 62 |
54 public ZusatzWert() { | 63 public ZusatzWert() { |
55 } | 64 } |
56 | 65 |
57 public Integer getId() { | 66 public Integer getId() { |
144 */ | 153 */ |
145 public void setReadonly(boolean readonly) { | 154 public void setReadonly(boolean readonly) { |
146 this.readonly = readonly; | 155 this.readonly = readonly; |
147 } | 156 } |
148 | 157 |
158 public Timestamp getParentModified() { | |
159 if (this.parentModified == null && this.probe != null) { | |
160 return this.probe.getTreeModified(); | |
161 } | |
162 return this.parentModified; | |
163 } | |
164 | |
165 public void setParentModified(Timestamp parentModified) { | |
166 this.parentModified = parentModified; | |
167 } | |
149 } | 168 } |