changeset 60:bfc34abd2252

Changed function to list proben. If no parameter is given return all available kommentare (was return empty list). If proben parameter is provided return only the kommentare which belogs to the probe with the given probe id.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 28 May 2013 11:48:22 +0200
parents f2c4d8a5f0d6
children d2434d55daa3
files src/main/java/de/intevation/lada/rest/LKommentarService.java
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/LKommentarService.java	Tue May 28 11:46:08 2013 +0200
+++ b/src/main/java/de/intevation/lada/rest/LKommentarService.java	Tue May 28 11:48:22 2013 +0200
@@ -65,15 +65,12 @@
     @Produces("text/json")
     public List<LKommentarP> filter(@Context UriInfo info) {
         MultivaluedMap<String, String> params = info.getQueryParameters();
-        if (params.isEmpty()) {
-            return new ArrayList<LKommentarP>(0);
-        }
         if (params.containsKey("probe")) {
             String probe = params.getFirst("probe");
             return repository.filter(probe);
         }
         else {
-            return new ArrayList<LKommentarP>(0);
+            return repository.findAll(LKommentarP.class);
         }
     }
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)