Mercurial > lada > lada-server
comparison src/main/java/de/intevation/model/LKommentarP.java @ 25:34d7ecfba8d1
Added Relation to Kommentare by using the atomatic generation from database
scheme. Doesn't work as expected and so I needed to add some extra code
(eg. insertable/updateable=false)
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 26 Apr 2013 19:52:21 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
24:dc3bfcc5f717 | 25:34d7ecfba8d1 |
---|---|
1 package de.intevation.model; | |
2 | |
3 import java.io.Serializable; | |
4 import javax.persistence.*; | |
5 import java.sql.Timestamp; | |
6 | |
7 | |
8 /** | |
9 * The persistent class for the l_kommentar_p database table. | |
10 * | |
11 */ | |
12 @Entity | |
13 @Table(name="l_kommentar_p") | |
14 public class LKommentarP implements Serializable { | |
15 private static final long serialVersionUID = 1L; | |
16 private LKommentarPPK id; | |
17 private String erzeuger; | |
18 private Timestamp kDatum; | |
19 private String kText; | |
20 private LProbe LProbe; | |
21 | |
22 public LKommentarP() { | |
23 } | |
24 | |
25 | |
26 @EmbeddedId | |
27 public LKommentarPPK getId() { | |
28 return this.id; | |
29 } | |
30 | |
31 public void setId(LKommentarPPK id) { | |
32 this.id = id; | |
33 } | |
34 | |
35 | |
36 public String getErzeuger() { | |
37 return this.erzeuger; | |
38 } | |
39 | |
40 public void setErzeuger(String erzeuger) { | |
41 this.erzeuger = erzeuger; | |
42 } | |
43 | |
44 | |
45 @Column(name="k_datum") | |
46 public Timestamp getKDatum() { | |
47 return this.kDatum; | |
48 } | |
49 | |
50 public void setKDatum(Timestamp kDatum) { | |
51 this.kDatum = kDatum; | |
52 } | |
53 | |
54 | |
55 @Column(name="k_text") | |
56 public String getKText() { | |
57 return this.kText; | |
58 } | |
59 | |
60 public void setKText(String kText) { | |
61 this.kText = kText; | |
62 } | |
63 | |
64 | |
65 //bi-directional many-to-one association to LProbe | |
66 @ManyToOne | |
67 @JoinColumn(name="probe_id", insertable=false, updatable=false) | |
68 public LProbe getLProbe() { | |
69 return this.LProbe; | |
70 } | |
71 | |
72 public void setLProbe(LProbe LProbe) { | |
73 this.LProbe = LProbe; | |
74 } | |
75 | |
76 } |