|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.database.sqlite.SQLiteOpenHelper
com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper
de.msponer.android.yac.db.DatabaseHelper
public class DatabaseHelper
ORM-Lite Database Helper class. For details see ORMLite manual.
Constructor Summary | |
---|---|
DatabaseHelper(Context context)
Constructor setting the required parameters. |
Method Summary | |
---|---|
void |
close()
Closes the database connections and clears any cached DAOs. |
void |
dropMobileWorkItemTable()
Drops the mobile work item table. |
com.j256.ormlite.dao.Dao<MobileWorkItem,Integer> |
getMobileWorkItemDao()
Returns the Database Access Object (DAO) for our MobileWorkItem class. |
void |
onCreate(SQLiteDatabase db,
com.j256.ormlite.support.ConnectionSource connectionSource)
This is called when the database is first created. |
void |
onUpgrade(SQLiteDatabase db,
com.j256.ormlite.support.ConnectionSource connectionSource,
int oldVersion,
int newVersion)
This is called when your application is upgraded and it has a higher version number. |
Methods inherited from class com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper |
---|
getConnectionSource, getDao, onCreate, onUpgrade |
Methods inherited from class android.database.sqlite.SQLiteOpenHelper |
---|
getReadableDatabase, getWritableDatabase, onOpen |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabaseHelper(Context context)
context
- The application context.Method Detail |
---|
public void onCreate(SQLiteDatabase db, com.j256.ormlite.support.ConnectionSource connectionSource)
onCreate
in class com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper
db
- The SQLite db.connectionSource
- The connection source.public void onUpgrade(SQLiteDatabase db, com.j256.ormlite.support.ConnectionSource connectionSource, int oldVersion, int newVersion)
onUpgrade
in class com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper
db
- The SQLite db.connectionSource
- The connection source.oldVersion
- The old db version.newVersion
- The new db version.public com.j256.ormlite.dao.Dao<MobileWorkItem,Integer> getMobileWorkItemDao() throws SQLException
SQLException
- Error during query.public void dropMobileWorkItemTable()
public void close()
close
in class com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |