comparison src/main/java/de/intevation/lada/model/stammdaten/Ort.java @ 1225:2bc06e7f6fb5

We might want to serialize an object without geom. This happens e.g. if an object is returned to the client before a geometry has been constructed, due to validation error.
author Tom Gottfried <tom@intevation.de>
date Fri, 09 Dec 2016 16:32:10 +0100
parents 2343f2995785
children
comparison
equal deleted inserted replaced
1224:73ad827faa81 1225:2bc06e7f6fb5
195 public void setLangtext(String langtext) { 195 public void setLangtext(String langtext) {
196 this.langtext = langtext; 196 this.langtext = langtext;
197 } 197 }
198 198
199 public Double getLatitude() { 199 public Double getLatitude() {
200 return this.geom.getY(); 200 // We might want to serialize an object without geom
201 return this.geom != null
202 ? this.geom.getY()
203 : null;
201 } 204 }
202 205
203 public Timestamp getLetzteAenderung() { 206 public Timestamp getLetzteAenderung() {
204 return this.letzteAenderung; 207 return this.letzteAenderung;
205 } 208 }
207 public void setLetzteAenderung(Timestamp letzteAenderung) { 210 public void setLetzteAenderung(Timestamp letzteAenderung) {
208 this.letzteAenderung = letzteAenderung; 211 this.letzteAenderung = letzteAenderung;
209 } 212 }
210 213
211 public Double getLongitude() { 214 public Double getLongitude() {
212 return this.geom.getX(); 215 // We might want to serialize an object without geom
216 return this.geom != null
217 ? this.geom.getX()
218 : null;
213 } 219 }
214 220
215 public String getMpArt() { 221 public String getMpArt() {
216 return this.mpArt; 222 return this.mpArt;
217 } 223 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)