use of tk.woppo.sunday.model.CurWeatherModel in project SunDay by iQuick.
the class WeatherCurDataHelper method query.
public CurWeatherModel query(String id) {
CurWeatherModel model = null;
Cursor cursor = query(null, WeatherCurDBInfo.ID + " = ?", new String[] { id }, null);
if (cursor.moveToFirst()) {
model = CurWeatherModel.fromCursor(cursor);
}
cursor.close();
return model;
}
use of tk.woppo.sunday.model.CurWeatherModel in project SunDay by iQuick.
the class WeatherCurDataHelper method bulkInsert.
public void bulkInsert(List<CurWeatherModel> models) {
ArrayList<ContentValues> contentValueses = new ArrayList<ContentValues>();
for (CurWeatherModel model : models) {
ContentValues values = getContentValues(model);
contentValueses.add(values);
}
ContentValues[] valueArray = new ContentValues[contentValueses.size()];
bulkInsert(contentValueses.toArray(valueArray));
}
Aggregations