예제 #1
0
 /**
  * @func 将Country实例的数据存储到db
  * @param country
  */
 public void saveCountry(Country country) {
   if (country != null) {
     ContentValues values = new ContentValues();
     values.put("country_name", country.getCountryName());
     values.put("country_code", country.getCountryCode());
     values.put("city_id", country.getCityId());
     db.insert("Country", null, values);
   }
 }