org.androwrapee.db
Class DefaultDatabaseHelper

java.lang.Object
  extended by SQLiteOpenHelper
      extended by org.androwrapee.db.DefaultDatabaseHelper

public class DefaultDatabaseHelper
extends SQLiteOpenHelper

The Class DefaultDatabaseHelper that acts like a SQLiteOpenHelper, creating the database when needed. Please check the documentation of DefaultDAO for full specifications and requirements.


Constructor Summary
DefaultDatabaseHelper(Context context, String databaseName, int databaseVersion, Class[] classes, String[] tableNames)
          Instantiates a new default database helper.
 
Method Summary
 void multiThreadClose()
          Multi thread close.
 SQLiteDatabase multiThreadOpen()
          Multi thread open.
 void onCreate(SQLiteDatabase database)
           
 void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDatabaseHelper

public DefaultDatabaseHelper(Context context,
                             String databaseName,
                             int databaseVersion,
                             Class[] classes,
                             String[] tableNames)
Instantiates a new default database helper.

Parameters:
context - the Android context
databaseName - the database name
databaseVersion - the database version
classes - the classes that this database should store
tableNames - the table names, in correspondence with the classes parameter.
Method Detail

multiThreadOpen

public SQLiteDatabase multiThreadOpen()
Multi thread open.

Returns:
the sQ lite database

multiThreadClose

public void multiThreadClose()
Multi thread close.


onCreate

public void onCreate(SQLiteDatabase database)

onUpgrade

public void onUpgrade(SQLiteDatabase db,
                      int oldVersion,
                      int newVersion)