java.lang.Object | ||
↳ | android.database.sqlite.SQLiteOpenHelper | |
↳ | com.kinvey.android.offline.OfflineHelper |
This class manages a set of OfflineTable
s.
This class is used by the OS to access sqllite, and delegates control to the appropriate OfflineTable.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
OfflineHelper(Context context)
used for accessing ALREADY existing tables
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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, String id)
Get an entity directly from an offline table
| ||||||||||
OfflineTable |
getTable(String collectionName)
Creates a new collection table, adds it to the metadata table, and returns it
| ||||||||||
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
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
used for accessing ALREADY existing tables
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 |
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.
Called by operating system when a database needs to be upgraded