Mercurial > lada > lada-server
changeset 251:4635fa8de9f4
Fixed loading Lort
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Mon, 15 Jul 2013 17:02:49 +0200 |
parents | 307ed0ca83ef |
children | 000bcc8c8fde |
files | src/main/java/de/intevation/lada/rest/LOrtService.java |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/LOrtService.java Mon Jul 15 15:41:12 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LOrtService.java Mon Jul 15 17:02:49 2013 +0200 @@ -109,7 +109,7 @@ * @return Response object. */ @PUT - @Path("/{id}") + @Path("/{portId}/{probeId}") @Produces("text/json") @Consumes("application/json") public Response update( @@ -165,9 +165,11 @@ * @return Response object. */ @DELETE - @Path("/{ortId}") + @Produces("text/json") + @Path("/{ortId}/{probeId}") public Response delete( @PathParam("ortId") String ortId, + @PathParam("probeId") String probeId, @Context HttpHeaders headers ) { try { @@ -175,7 +177,7 @@ new QueryBuilder<LOrt>( repository.getEntityManager(), LOrt.class); - builder.and("POrtId", ortId); + builder.and("POrtId", ortId).and("probeId", probeId); Response response = repository.filter(builder.getQuery()); List<LOrt> list = (List<LOrt>)response.getData(); if (!list.isEmpty()) {