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

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

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

revision 893 by torben, Tue Jun 15 06:34:42 2010 UTC revision 894 by torben, Thu Jun 24 17:00:39 2010 UTC
# Line 8  import java.sql.Statement; Line 8  import java.sql.Statement;
8  import java.util.ArrayList;  import java.util.ArrayList;
9  import java.util.List;  import java.util.List;
10    
11    import com.sun.istack.logging.Logger;
12    
13  public class StationDAO {  public class StationDAO {
14          final static int LOCATION_LIMIT = 5;          final static int LOCATION_LIMIT = 5;
15            static final Logger logger = Logger.getLogger(StationDAO.class);
16                    
17          private StationBean convertSingleRow(ResultSet res) throws SQLException {          private StationBean convertSingleRow(ResultSet res) throws SQLException {
18                  StationBean station = new StationBean();                  StationBean station = new StationBean();
# Line 155  public class StationDAO { Line 158  public class StationDAO {
158                  List<StationBean> result = getByLocationWorker(latitude, longitude, true);                  List<StationBean> result = getByLocationWorker(latitude, longitude, true);
159                                    
160                  if (result.size() < LOCATION_LIMIT) { //failover                  if (result.size() < LOCATION_LIMIT) { //failover
161                            logger.info("getByLocation failover: " +latitude + "," + longitude);
162                            
163                          result = getByLocationWorker(latitude, longitude, false);                          result = getByLocationWorker(latitude, longitude, false);
164                  }                  }
165                                    

Legend:
Removed from v.893  
changed lines
  Added in v.894

  ViewVC Help
Powered by ViewVC 1.1.20