changeset 194:682a3acdae70

Use ort id instead of embedded ort object in LOrt.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 01 Jul 2013 14:45:08 +0200
parents 7f97c469faf0
children ad8e9cc164a8
files src/main/java/de/intevation/lada/model/LOrt.java
diffstat 1 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/LOrt.java	Mon Jul 01 14:44:29 2013 +0200
+++ b/src/main/java/de/intevation/lada/model/LOrt.java	Mon Jul 01 14:45:08 2013 +0200
@@ -21,7 +21,7 @@
 public class LOrt implements java.io.Serializable {
 
 	private int POrtId;
-	private Ort ort;
+	private int ortId;
 	private String probeId;
 	private String ortsTyp;
 	private String ortszusatztext;
@@ -30,16 +30,16 @@
 	public LOrt() {
 	}
 
-	public LOrt(int POrtId, Ort ort, String probeId) {
+	public LOrt(int POrtId, int ortId, String probeId) {
 		this.POrtId = POrtId;
-		this.ort = ort;
+		this.ortId = ortId;
 		this.probeId = probeId;
 	}
 
-	public LOrt(int POrtId, Ort ort, String probeId, String ortsTyp,
+	public LOrt(int POrtId, int ortId, String probeId, String ortsTyp,
 			String ortszusatztext, Date letzteAenderung) {
 		this.POrtId = POrtId;
-		this.ort = ort;
+		this.ortId = ortId;
 		this.probeId = probeId;
 		this.ortsTyp = ortsTyp;
 		this.ortszusatztext = ortszusatztext;
@@ -56,14 +56,13 @@
 		this.POrtId = POrtId;
 	}
 
-	@ManyToOne(fetch = FetchType.EAGER)
-	@JoinColumn(name = "ort_id", nullable = false)
-	public Ort getOrt() {
-		return this.ort;
+	@Column(name = "ort_id", nullable = false)
+	public int getOrt() {
+		return this.ortId;
 	}
 
-	public void setOrt(Ort ort) {
-		this.ort = ort;
+	public void setOrtId(int ortId) {
+		this.ortId = ortId;
 	}
 
 	@Column(name = "probe_id", nullable = false)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)