public class SqlCipherDatabaseSource extends SQLiteOpenHelper implements DatabaseProvider<SQLiteDatabase>
| Constructor and Description |
|---|
SqlCipherDatabaseSource(android.content.Context context,
io.requery.meta.EntityModel model,
java.lang.String name,
java.lang.String password,
int version) |
| Modifier and Type | Method and Description |
|---|---|
io.requery.sql.Configuration |
getConfiguration() |
java.sql.Connection |
getConnection() |
SQLiteDatabase |
getReadableDatabase() |
SQLiteDatabase |
getWritableDatabase() |
protected void |
onConfigure(io.requery.sql.ConfigurationBuilder builder)
Callback for when the database should be configured.
|
void |
onConfigure(SQLiteDatabase db)
Callback for when the database should be configured.
|
void |
onCreate(SQLiteDatabase db)
Callback for when the database schema is to be created.
|
protected io.requery.sql.Mapping |
onCreateMapping(io.requery.sql.Platform platform) |
void |
onUpgrade(SQLiteDatabase db,
int oldVersion,
int newVersion)
Callback for when the database should be upgraded from an previous version to a new version.
|
void |
setLoggingEnabled(boolean enable)
Enables statement logging.
|
void |
setTableCreationMode(io.requery.sql.TableCreationMode mode)
Sets the
TableCreationMode to use when the database is created or upgraded. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic SqlCipherDatabaseSource(android.content.Context context,
io.requery.meta.EntityModel model,
java.lang.String name,
java.lang.String password,
int version)
public void setLoggingEnabled(boolean enable)
DatabaseProvidersetLoggingEnabled in interface DatabaseProvider<SQLiteDatabase>enable - true to enable, false otherwise default is false.public void setTableCreationMode(io.requery.sql.TableCreationMode mode)
DatabaseProviderTableCreationMode to use when the database is created or upgraded.setTableCreationMode in interface DatabaseProvider<SQLiteDatabase>mode - to useprotected io.requery.sql.Mapping onCreateMapping(io.requery.sql.Platform platform)
protected void onConfigure(io.requery.sql.ConfigurationBuilder builder)
DatabaseProvideronConfigure in interface DatabaseProvider<SQLiteDatabase>builder - instancepublic io.requery.sql.Configuration getConfiguration()
getConfiguration in interface DatabaseProvider<SQLiteDatabase>Configuration used by the providerpublic void onCreate(SQLiteDatabase db)
DatabaseProvideronCreate in interface DatabaseProvider<SQLiteDatabase>db - instancepublic void onConfigure(SQLiteDatabase db)
DatabaseProvideronConfigure in interface DatabaseProvider<SQLiteDatabase>db - instancepublic void onUpgrade(SQLiteDatabase db,
int oldVersion,
int newVersion)
DatabaseProvideronUpgrade in interface DatabaseProvider<SQLiteDatabase>db - instancepublic java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface io.requery.sql.ConnectionProviderjava.sql.SQLExceptionpublic SQLiteDatabase getReadableDatabase()
getReadableDatabase in interface DatabaseProvider<SQLiteDatabase>public SQLiteDatabase getWritableDatabase()
getWritableDatabase in interface DatabaseProvider<SQLiteDatabase>