java.lang.Object | ||
↳ | android.database.sqlite.SQLiteOpenHelper | |
↳ | com.kinvey.android.offline.OfflineHelper |
This class manages a set of OfflineTable
s. Tables are not maintained in memory, and are created on demand.
This class is used by the OS to access sqllite, and delegates control to the appropriate OfflineTable (with a couple helper methods).
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | delete(String table, String whereClause, String[] whereArgs) | ||||||||||
List<String> |
getCollectionTables()
query the metdata table for a list of all collection tables, returning them as a list
| ||||||||||
GenericJson |
getEntity(AbstractClient client, AppData appData, OfflineRequestInfo.OfflineMetaData id)
Get an entity directly from an offline table
| ||||||||||
synchronized static OfflineHelper |
getInstance(Context context)
This class is a synchronized Singleton, and this is how you get an instance of it.
| ||||||||||
OfflineTable |
getTable(String collectionName)
Creates a new collection table, adds it to the metadata table, and returns it
| ||||||||||
long | insert(String table, String nullColumnHack, ContentValues values) | ||||||||||
void |
onCreate(SQLiteDatabase database)
Called by operating system when a new database is created.
| ||||||||||
void |
onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion)
Called by operating system when a database needs to be upgraded
| ||||||||||
Cursor | query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) | ||||||||||
void | runCommand(String command) | ||||||||||
void | setContext(Context context) | ||||||||||
int | updateWithOnConflict(String table, ContentValues values, String whereClause, String[] whereArgs, int conflictAlgorithm) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
query the metdata table for a list of all collection tables, returning them as a list
Get an entity directly from an offline table
client | - an instance of the client |
---|---|
appData | - an instance of appdata |
id | - the id of the entity to return |
This class is a synchronized Singleton, and this is how you get an instance of it.
context | the current active application context |
---|
Creates a new collection table, adds it to the metadata table, and returns it
collectionName | - the collection to create a new table for |
---|
Called by operating system when a new database is created. Don't actually do anything here.
database | the newly created database |
---|
Called by operating system when a database needs to be upgraded