Mercurial > lada > lada-server
comparison src/main/java/de/intevation/lada/model/LMessungId.java @ 245:1963f002e4c0
Use a sequence to generate the id and create an id object in service.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 15 Jul 2013 13:22:55 +0200 |
parents | 7ea3ea59e971 |
children | 04b5f401e871 |
comparison
equal
deleted
inserted
replaced
244:f3e15ba7c3b7 | 245:1963f002e4c0 |
---|---|
2 | 2 |
3 // Generated 21.05.2013 16:58:30 by Hibernate Tools 3.4.0.CR1 | 3 // Generated 21.05.2013 16:58:30 by Hibernate Tools 3.4.0.CR1 |
4 | 4 |
5 import javax.persistence.Column; | 5 import javax.persistence.Column; |
6 import javax.persistence.Embeddable; | 6 import javax.persistence.Embeddable; |
7 import javax.persistence.GeneratedValue; | |
8 import javax.persistence.GenerationType; | |
7 | 9 |
8 /** | 10 /** |
9 * LMessungId generated by hbm2java | 11 * LMessungId generated by hbm2java |
10 */ | 12 */ |
11 @Embeddable | 13 @Embeddable |
30 public void setProbeId(String probeId) { | 32 public void setProbeId(String probeId) { |
31 this.probeId = probeId; | 33 this.probeId = probeId; |
32 } | 34 } |
33 | 35 |
34 @Column(name = "messungs_id", nullable = false) | 36 @Column(name = "messungs_id", nullable = false) |
37 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "MESSUNG_ID_STORE") | |
35 public short getMessungsId() { | 38 public short getMessungsId() { |
36 return this.messungsId; | 39 return this.messungsId; |
37 } | 40 } |
38 | 41 |
39 public void setMessungsId(short messungsId) { | 42 public void setMessungsId(short messungsId) { |