public class DatabaseHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private com.j256.ormlite.dao.Dao<Category,java.lang.Integer> |
categoryDao
Database access object used to interact with the database.
|
private com.j256.ormlite.dao.Dao<CategoryItem,java.lang.Integer> |
categoryItemsDao |
private static java.lang.String |
DATABASE_NAME |
private static int |
DATABASE_VERSION |
private static java.lang.String |
TAG |
Constructor and Description |
---|
DatabaseHelper(Context context) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
com.j256.ormlite.dao.Dao<Category,java.lang.Integer> |
getCategoryDao()
Returns an instance of the data access object
corresponding to the passed model
|
com.j256.ormlite.dao.Dao<CategoryItem,java.lang.Integer> |
getCategoryItemsDao() |
void |
onCreate(SQLiteDatabase database,
com.j256.ormlite.support.ConnectionSource connectionSource) |
void |
onUpgrade(SQLiteDatabase database,
com.j256.ormlite.support.ConnectionSource connectionSource,
int oldVersion,
int newVersion) |
private static final java.lang.String DATABASE_NAME
private static final int DATABASE_VERSION
private static final java.lang.String TAG
private com.j256.ormlite.dao.Dao<Category,java.lang.Integer> categoryDao
private com.j256.ormlite.dao.Dao<CategoryItem,java.lang.Integer> categoryItemsDao
public void onCreate(SQLiteDatabase database, com.j256.ormlite.support.ConnectionSource connectionSource)
public void onUpgrade(SQLiteDatabase database, com.j256.ormlite.support.ConnectionSource connectionSource, int oldVersion, int newVersion)
public com.j256.ormlite.dao.Dao<Category,java.lang.Integer> getCategoryDao()
java.sql.SQLException
public com.j256.ormlite.dao.Dao<CategoryItem,java.lang.Integer> getCategoryItemsDao()
public void close()