If you think the Android project infinitep 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 es.daconstenla.infinip.database;
/*fromwww.java2s.com*/import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
publicclass InfinitepHelper extends SQLiteOpenHelper{
privatestaticfinal String DB_NAME = "infinitep.db";
privatestaticfinalint DB_VERSION = 1;
public InfinitepHelper(Context context) {
super(context, DB_NAME, null, DB_VERSION);
}
@Override
publicvoid onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
TableMovementRaw.onCreate(db,TableMovementRaw.IS_HISTORY_TABLE);
TableMovementRaw.onCreate(db,TableMovementRaw.IS_NORMAL_TABLE);
TableMovementSummary.onCreate(db);
}
@Override
/**
* @param db database where the upgrade will be done
* @param oldVersion old numeric version of the database
* @param newVersion
*/publicvoid onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
TableMovementRaw.onUpgrade(db,oldVersion,newVersion,TableMovementRaw.IS_NORMAL_TABLE);
TableMovementRaw.onUpgrade(db,oldVersion,newVersion,TableMovementRaw.IS_HISTORY_TABLE);
TableMovementSummary.onUpgrade(db,oldVersion,newVersion);
}
public InfinitepHelper getDatabaseReadable(){
return getDatabaseReadable();
}
public InfinitepHelper getDatabaseWritable(){
return getDatabaseWritable();
}
}