Mercurial > lada > lada-server
changeset 257:1cdb6b8a0843
Added k_id column to LKommentrM object to be able to find and delete it.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 15 Jul 2013 17:51:06 +0200 |
parents | 18f87f4ff767 |
children | 4810071c364c |
files | src/main/java/de/intevation/lada/model/LKommentarM.java src/main/java/de/intevation/lada/rest/LKommentarMService.java |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/LKommentarM.java Mon Jul 15 17:50:18 2013 +0200 +++ b/src/main/java/de/intevation/lada/model/LKommentarM.java Mon Jul 15 17:51:06 2013 +0200 @@ -24,6 +24,7 @@ public class LKommentarM implements java.io.Serializable { private LKommentarMId id; + private Integer kId; private String probeId; private Integer messungsId; private String erzeuger; @@ -65,7 +66,16 @@ this.id = id; } - @Column(name = "probe_id", nullable = false, insertable = false, updatable = false) + @Column(name = "k_id", nullable = false, insertable = false, updatable = false) + public Integer getKId() { + return kId; + } + + public void setKId(Integer kId) { + this.kId = kId; + } + + @Column(name = "probe_id", nullable = false, insertable = false, updatable = false) public String getProbeId() { return probeId; }
--- a/src/main/java/de/intevation/lada/rest/LKommentarMService.java Mon Jul 15 17:50:18 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LKommentarMService.java Mon Jul 15 17:51:06 2013 +0200 @@ -179,7 +179,7 @@ new QueryBuilder<LKommentarM>( repository.getEntityManager(), LKommentarM.class); - builder.and("kId", kId) + builder.and("KId", kId) .and("messungsId", messungsId) .and("probeId", probeId); Response response = repository.filter(builder.getQuery());