/[projects]/android/TrainInfoService/src/dk/thoerup/traininfoservice/LocateStations.java
ViewVC logotype

Diff of /android/TrainInfoService/src/dk/thoerup/traininfoservice/LocateStations.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 710 by torben, Mon Feb 8 19:12:15 2010 UTC revision 711 by torben, Wed May 5 20:11:03 2010 UTC
# Line 41  public class LocateStations extends Http Line 41  public class LocateStations extends Http
41          protected List<StationBean> getStations(HttpServletRequest req) throws SQLException {          protected List<StationBean> getStations(HttpServletRequest req) throws SQLException {
42                  List<StationBean> stations = null;                  List<StationBean> stations = null;
43                  if (req.getParameter("latitude") != null && req.getParameter("latitude") != null) {                  if (req.getParameter("latitude") != null && req.getParameter("latitude") != null) {
44                            
45                            Statistics.getInstance().incrementStationLookupsLocation();
46                            
47                          double latitude = Double.parseDouble( req.getParameter("latitude") );                          double latitude = Double.parseDouble( req.getParameter("latitude") );
48                          double longitude = Double.parseDouble( req.getParameter("longitude") );                          double longitude = Double.parseDouble( req.getParameter("longitude") );
49                          stations = stationDao.getByLocation(latitude, longitude);                          stations = stationDao.getByLocation(latitude, longitude);
50    
51                  } else if (req.getParameter("name") != null) {                  } else if (req.getParameter("name") != null) {
52                            Statistics.getInstance().incrementStationLookupsName();
53                          String name = req.getParameter("name").trim();                          String name = req.getParameter("name").trim();
54                          stations = stationDao.getByName(name);                          stations = stationDao.getByName(name);
55    
56                  } else if (req.getParameter("list") != null) {                  } else if (req.getParameter("list") != null) {
57                            Statistics.getInstance().incrementStationLookupsFavorites();
58                          String list = transformToIntList( req.getParameter("list"));                          String list = transformToIntList( req.getParameter("list"));
59                          stations = stationDao.getByList(list);                          stations = stationDao.getByList(list);
60                  }                  }

Legend:
Removed from v.710  
changed lines
  Added in v.711

  ViewVC Help
Powered by ViewVC 1.1.20