Android Open Source - firstcodeandroid Cool Weather Open Helper

From Project

Back to project page firstcodeandroid.


The source code is released under:

MIT License

If you think the Android project firstcodeandroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.vjia.coolweather.db;
/*w  ww. ja v  a2  s  .co  m*/
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class CoolWeatherOpenHelper extends SQLiteOpenHelper{

  public static final String CREATE_PROVINCE = "create table Province (" +
      "id integer primary key autoincrement," +
      "province_name text," +
      "province_code text)";
  public static final String CREATE_CITY = "create table City("+
      "id integer primary key autoincrement,"+
      "city_name text," +
      "city_code text," +
      "province_id integer)";
  public static final String CREATE_COUNTY="create table County(" +
      "id integer primary key autoincrement," +
      "county_name text," +
      "county_code text," +
      "city_id integer)";
  public CoolWeatherOpenHelper(Context context, String name,
      CursorFactory factory, int version) {
    super(context, name, factory, version);
    // TODO Auto-generated constructor stub

  public void onCreate(SQLiteDatabase db) {
    // TODO Auto-generated method stub

  public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
    // TODO Auto-generated method stub


Java Source Code List