changeset 36:8155d2ed5cb8

Use String for lprobe id.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 23 May 2013 14:47:21 +0200
parents f425150ea2b5
children d490e369d9ee
files src/main/java/de/intevation/lada/data/LProbeRepository.java src/main/java/de/intevation/lada/rest/LProbeRESTService.java
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/LProbeRepository.java	Thu May 23 14:12:27 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/LProbeRepository.java	Thu May 23 14:47:21 2013 +0200
@@ -42,7 +42,7 @@
     @Inject
     private LProbeService service;
 
-    public LProbe findById(Long id) {
+    public LProbe findById(String id) {
         return em.find(LProbe.class, id);
     }
 
--- a/src/main/java/de/intevation/lada/rest/LProbeRESTService.java	Thu May 23 14:12:27 2013 +0200
+++ b/src/main/java/de/intevation/lada/rest/LProbeRESTService.java	Thu May 23 14:47:21 2013 +0200
@@ -36,9 +36,9 @@
     private Logger log;
 
     @GET
-    @Path("/{id:[0-9][0-9]*}")
-    @Produces("text/plain")
-    public LProbe loadById(@PathParam("id") long id) {
+    @Path("/{id}")
+    @Produces("text/json")
+    public LProbe loadById(@PathParam("id") String id) {
        return repository.findById(id);
     }
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)