/[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 377 by torben, Thu Oct 1 08:21:09 2009 UTC revision 425 by torben, Thu Oct 8 20:46:40 2009 UTC
# Line 74  public class LocateStations extends Http Line 74  public class LocateStations extends Http
74                                          "WHERE name ILIKE ? AND latitude IS NOT NULL AND longitude IS NOT NULL " +                                          "WHERE name ILIKE ? AND latitude IS NOT NULL AND longitude IS NOT NULL " +
75                                          "ORDER BY name ";                                          "ORDER BY name ";
76                                  stmt = conn.prepareStatement(SQL);                                  stmt = conn.prepareStatement(SQL);
77                                  stmt.setString(1, "%" + name + "%");                                  stmt.setString(1, name + "%");
78                                  break;                                  break;
79                          default:                          default:
80                                  // This should not be possible                                  // This should not be possible
# Line 111  public class LocateStations extends Http Line 111  public class LocateStations extends Http
111                  return buff.toString();                  return buff.toString();
112          }          }
113    
114            @Override
115          protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {          protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
116    
117                  double longitude = 0.0;                  double longitude = 0.0;
# Line 126  public class LocateStations extends Http Line 127  public class LocateStations extends Http
127                  }                  }
128    
129                  if (request.getParameter("name") != null) {                  if (request.getParameter("name") != null) {
130                          name = request.getParameter("name");                          name = request.getParameter("name").trim();
131                          method = Requested.BY_NAME;                          method = Requested.BY_NAME;
132                  }                  }
133    

Legend:
Removed from v.377  
changed lines
  Added in v.425

  ViewVC Help
Powered by ViewVC 1.1.20