--- android/TrainInfoService/src/dk/thoerup/traininfoservice/LocateStations.java 2011/07/08 12:37:16 1556 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/LocateStations.java 2011/07/08 12:47:02 1557 @@ -49,23 +49,31 @@ protected StationBean getStations(HttpServletRequest req) throws SQLException { StationBean stations = null; + + boolean dummy = req.getParameter("dummy") != null; + if (dummy == true) + stations = new StationBean(); + if (req.getParameter("latitude") != null && req.getParameter("latitude") != null) { Statistics.getInstance().incrementStationLookupsLocation(); double latitude = Double.parseDouble( req.getParameter("latitude") ); double longitude = Double.parseDouble( req.getParameter("longitude") ); - stations = stationDao.getByLocation(latitude, longitude); + if (dummy == false) + stations = stationDao.getByLocation(latitude, longitude); } else if (req.getParameter("name") != null) { Statistics.getInstance().incrementStationLookupsName(); String name = req.getParameter("name").trim(); - stations = stationDao.getByName(name); + if (dummy == false) + stations = stationDao.getByName(name); } else if (req.getParameter("list") != null) { Statistics.getInstance().incrementStationLookupsFavorites(); String list = transformToIntList( req.getParameter("list")); - stations = stationDao.getByList(list); + if (dummy == false) + stations = stationDao.getByList(list); } else if (req.getParameter("dump") != null) { stations = stationDao.dumpAll(); }