Exemplo n.º 1
0
 @Override
 public void onAddEditCompleted(String city, String state, boolean home_boolean) {
   DatabaseDriver databaseDriver = new DatabaseDriver(this);
   databaseDriver.insertLocation(city, state, home_boolean);
   databaseDriver.close();
   weatherList.updateLocationList();
 }
Exemplo n.º 2
0
 private void loadLocation() {
   DatabaseDriver databaseDriver = new DatabaseDriver(getActivity());
   Cursor cursor = databaseDriver.getLocation(rowID);
   cursor.moveToFirst();
   String entry =
       cursor.getString(cursor.getColumnIndex("city"))
           + ", "
           + cursor.getString(cursor.getColumnIndex("state"));
   cursor.close();
   databaseDriver.close();
   new FetchWeatherTask().execute(entry);
 }
Exemplo n.º 3
0
 private void maybeGetDriverClassName() {
   if (!this.properties.containsKey("driverClassName") && this.properties.containsKey("url")) {
     String url = this.properties.get("url");
     String driverClass = DatabaseDriver.fromJdbcUrl(url).getDriverClassName();
     this.properties.put("driverClassName", driverClass);
   }
 }
Exemplo n.º 4
0
 private void deleteLocation() {
   DatabaseDriver databaseDriver = new DatabaseDriver(getActivity());
   databaseDriver.deleteLocation(rowID);
   databaseDriver.close();
 }