Mercurial > lada > lada-server
comparison src/main/java/de/intevation/lada/model/land/Ortszuordnung.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; | |
13 import javax.persistence.Transient; | |
11 | 14 |
12 | 15 |
13 /** | 16 /** |
14 * The persistent class for the ortszuordnung database table. | 17 * The persistent class for the ortszuordnung database table. |
15 * | 18 * |
36 @Column(name="probe_id") | 39 @Column(name="probe_id") |
37 private Integer probeId; | 40 private Integer probeId; |
38 | 41 |
39 @Column(name="tree_modified") | 42 @Column(name="tree_modified") |
40 private Timestamp treeModified; | 43 private Timestamp treeModified; |
44 | |
45 @OneToOne | |
46 @JoinColumn(name="probe_id", insertable=false, updatable=false) | |
47 private Probe probe; | |
48 | |
49 @Transient | |
50 private boolean owner; | |
51 | |
52 @Transient | |
53 private boolean readonly; | |
54 | |
55 @Transient | |
56 private Timestamp parentModified; | |
41 | 57 |
42 public Ortszuordnung() { | 58 public Ortszuordnung() { |
43 } | 59 } |
44 | 60 |
45 public Integer getId() { | 61 public Integer getId() { |
96 | 112 |
97 public void setTreeModified(Timestamp treeModified) { | 113 public void setTreeModified(Timestamp treeModified) { |
98 this.treeModified = treeModified; | 114 this.treeModified = treeModified; |
99 } | 115 } |
100 | 116 |
117 /** | |
118 * @return the owner | |
119 */ | |
120 public boolean isOwner() { | |
121 return owner; | |
122 } | |
123 | |
124 /** | |
125 * @param owner the owner to set | |
126 */ | |
127 public void setOwner(boolean owner) { | |
128 this.owner = owner; | |
129 } | |
130 | |
131 /** | |
132 * @return the readonly | |
133 */ | |
134 public boolean isReadonly() { | |
135 return readonly; | |
136 } | |
137 | |
138 /** | |
139 * @param readonly the readonly to set | |
140 */ | |
141 public void setReadonly(boolean readonly) { | |
142 this.readonly = readonly; | |
143 } | |
144 | |
145 public Timestamp getParentModified() { | |
146 if (this.parentModified == null && this.probe != null) { | |
147 return this.probe.getTreeModified(); | |
148 } | |
149 return this.parentModified; | |
150 } | |
151 | |
152 public void setParentModified(Timestamp parentModified) { | |
153 this.parentModified = parentModified; | |
154 } | |
101 } | 155 } |