public final class VersionTable extends Object
| Modifier and Type | Field | Description |
|---|---|---|
static int |
FEATURE_CACHE_CONTENT_METADATA |
Version of tables used for cache content metadata.
|
static int |
FEATURE_CACHE_FILE_METADATA |
Version of tables used for cache file metadata.
|
static int |
FEATURE_EXTERNAL |
Version of tables used from external features.
|
static int |
FEATURE_OFFLINE |
Version of tables used for offline functionality.
|
static int |
VERSION_UNSET |
Returned by
getVersion(SQLiteDatabase, int, String) if the version is unset. |
| Modifier and Type | Method | Description |
|---|---|---|
static int |
getVersion(SQLiteDatabase database,
int feature,
String instanceUid) |
Returns the version of a specified instance of a feature, or
VERSION_UNSET if no
version is set. |
static void |
removeVersion(SQLiteDatabase writableDatabase,
int feature,
String instanceUid) |
Removes the version of a specified instance of a feature.
|
static void |
setVersion(SQLiteDatabase writableDatabase,
int feature,
String instanceUid,
int version) |
Sets the version of a specified instance of a specified feature.
|
public static final int VERSION_UNSET
getVersion(SQLiteDatabase, int, String) if the version is unset.public static final int FEATURE_OFFLINE
public static final int FEATURE_CACHE_CONTENT_METADATA
public static final int FEATURE_CACHE_FILE_METADATA
public static final int FEATURE_EXTERNAL
public static void setVersion(SQLiteDatabase writableDatabase, @Feature int feature, String instanceUid, int version) throws DatabaseIOException
writableDatabase - The database to update.feature - The feature.instanceUid - The unique identifier of the instance of the feature.version - The version.DatabaseIOException - If an error occurs executing the SQL.public static void removeVersion(SQLiteDatabase writableDatabase, @Feature int feature, String instanceUid) throws DatabaseIOException
writableDatabase - The database to update.feature - The feature.instanceUid - The unique identifier of the instance of the feature.DatabaseIOException - If an error occurs executing the SQL.public static int getVersion(SQLiteDatabase database, @Feature int feature, String instanceUid) throws DatabaseIOException
VERSION_UNSET if no
version is set.database - The database to query.feature - The feature.instanceUid - The unique identifier of the instance of the feature.VERSION_UNSET if no version is set.DatabaseIOException - If an error occurs executing the SQL.