Android Open Source - GeoTasker Profiles S Q Lite Helper






From Project

Back to project page GeoTasker.

License

The source code is released under:

GNU General Public License

If you think the Android project GeoTasker 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.fjaviermo.database;
//from  ww  w .  j  a v a2 s  . c o m
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class ProfilesSQLiteHelper {
 
    public static final String TABLE_NAME = "profiles";
    public static final String COLUMN_ID = "_id";
    public static final String COLUMN_NAME = "name";
    public static final String COLUMN_ACTIVE = "active";

    // Database creation sql statement
    private static final String CREATE_TABLE_PROFILES = "create table "
        + TABLE_NAME + "(" + COLUMN_ID
        + " integer primary key autoincrement, " + COLUMN_NAME
        + " text not null, " + COLUMN_ACTIVE
        + " integer not null);";


    public static void onCreate(SQLiteDatabase database) {
      database.execSQL(CREATE_TABLE_PROFILES);
    }

    public static void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
      Log.w(ProfilesSQLiteHelper.class.getName(),
          "Upgrading database from version " + oldVersion + " to "
              + newVersion + ", which will destroy all old data");
      db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
      onCreate(db);
    }
}




Java Source Code List

com.fjaviermo.adapter.ProfileAdapter.java
com.fjaviermo.dao.LocationDataSource.java
com.fjaviermo.dao.ProfilesDataSource.java
com.fjaviermo.database.DatabaseHelper.java
com.fjaviermo.database.LocationSQLiteHelper.java
com.fjaviermo.database.ProfilesSQLiteHelper.java
com.fjaviermo.geotasker.AddProfileDialogFragment.java
com.fjaviermo.geotasker.MainActivity.java
com.fjaviermo.geotasker.ProfileFragment.java
com.fjaviermo.geotasker.ProfileListFragment.java
com.fjaviermo.model.Location.java
com.fjaviermo.model.Profile.java