Mercurial > lada > lada-server
changeset 119:7b715f7f7c1a
Use reference to 'Ort' instead of 'ort_id' again.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 12 Jun 2013 16:09:17 +0200 |
parents | ffe3234a4590 |
children | 0fcd395c7d07 |
files | src/main/java/de/intevation/lada/model/LOrt.java |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/LOrt.java Wed Jun 12 16:08:14 2013 +0200 +++ b/src/main/java/de/intevation/lada/model/LOrt.java Wed Jun 12 16:09:17 2013 +0200 @@ -21,7 +21,7 @@ public class LOrt implements java.io.Serializable { private int POrtId; - private Long ortId; + private Ort ort; private String probeId; private String ortsTyp; private String ortszusatztext; @@ -30,16 +30,16 @@ public LOrt() { } - public LOrt(int POrtId, Long ortId, String probeId) { + public LOrt(int POrtId, Ort ort, String probeId) { this.POrtId = POrtId; - this.ortId = ortId; + this.ort = ort; this.probeId = probeId; } - public LOrt(int POrtId, Long ortId, String probeId, String ortsTyp, + public LOrt(int POrtId, Ort ort, String probeId, String ortsTyp, String ortszusatztext, Date letzteAenderung) { this.POrtId = POrtId; - this.ortId = ortId; + this.ort = ort; this.probeId = probeId; this.ortsTyp = ortsTyp; this.ortszusatztext = ortszusatztext; @@ -56,13 +56,14 @@ this.POrtId = POrtId; } - @Column(name = "ort_id", nullable = false) - public Long getOrtId() { - return this.ortId; + @ManyToOne(fetch = FetchType.EAGER) + @JoinColumn(name = "ort_id", nullable = false) + public Ort getOrt() { + return this.ort; } - public void setOrtId(Long ortId) { - this.ortId = ortId; + public void setOrt(Ort ort) { + this.ort = ort; } @Column(name = "probe_id", nullable = false)