Back to Exoplayer

VersionTable (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/database/VersionTable.html

latest7.5 KB
Original Source

Package com.google.android.exoplayer2.database

Class VersionTable


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classVersionTableextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Utility methods for accessing versions of media library database components. This allows them to be versioned independently to the version of the containing database.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static int | FEATURE_CACHE_CONTENT_METADATA | Deprecated.

Version of tables used for cache content metadata. | | static int | FEATURE_CACHE_FILE_METADATA | Deprecated.

Version of tables used for cache file metadata. | | static int | FEATURE_EXTERNAL | Deprecated.

Version of tables used from external features. | | static int | FEATURE_OFFLINE | Deprecated.

Version of tables used for offline functionality. | | static int | VERSION_UNSET | Deprecated.

Returned by getVersion(SQLiteDatabase, int, String) if the version is unset. |

Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | static int | getVersion​(SQLiteDatabase database, @com.google.android.exoplayer2.database.VersionTable.Feature int feature, String instanceUid) | Deprecated.

Returns the version of a specified instance of a feature, or VERSION_UNSET if no version is set. | | static void | removeVersion​(SQLiteDatabase writableDatabase, @com.google.android.exoplayer2.database.VersionTable.Feature int feature, String instanceUid) | Deprecated.

Removes the version of a specified instance of a feature. | | static void | setVersion​(SQLiteDatabase writableDatabase, @com.google.android.exoplayer2.database.VersionTable.Feature int feature, String instanceUid, int version) | Deprecated.

Sets the version of a specified instance of a specified feature. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

VERSION_UNSET

public static final int VERSION_UNSET

Deprecated.

Returned by getVersion(SQLiteDatabase, int, String) if the version is unset. See Also:Constant Field Values

- 

FEATURE_OFFLINE

public static final int FEATURE_OFFLINE

Deprecated.

Version of tables used for offline functionality. See Also:Constant Field Values

- 

FEATURE_CACHE_CONTENT_METADATA

public static final int FEATURE_CACHE_CONTENT_METADATA

Deprecated.

Version of tables used for cache content metadata. See Also:Constant Field Values

- 

FEATURE_CACHE_FILE_METADATA

public static final int FEATURE_CACHE_FILE_METADATA

Deprecated.

Version of tables used for cache file metadata. See Also:Constant Field Values

- 

FEATURE_EXTERNAL

public static final int FEATURE_EXTERNAL

Deprecated.

Version of tables used from external features. See Also:Constant Field Values

Method Detail

- 

setVersion

public static void setVersion​([SQLiteDatabase](https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html "class or interface in android.database.sqlite")writableDatabase,
                              @com.google.android.exoplayer2.database.VersionTable.Feature int feature,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")instanceUid,
                              int version)
                       throws[DatabaseIOException](DatabaseIOException.html "class in com.google.android.exoplayer2.database")

Deprecated.

Sets the version of a specified instance of a specified feature. Parameters:writableDatabase - The database to update.feature - The feature.instanceUid - The unique identifier of the instance of the feature.version - The version.Throws:DatabaseIOException - If an error occurs executing the SQL.

- 

removeVersion

public static void removeVersion​([SQLiteDatabase](https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html "class or interface in android.database.sqlite")writableDatabase,
                                 @com.google.android.exoplayer2.database.VersionTable.Feature int feature,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")instanceUid)
                          throws[DatabaseIOException](DatabaseIOException.html "class in com.google.android.exoplayer2.database")

Deprecated.

Removes the version of a specified instance of a feature. Parameters:writableDatabase - The database to update.feature - The feature.instanceUid - The unique identifier of the instance of the feature.Throws:DatabaseIOException - If an error occurs executing the SQL.

- 

getVersion

public static int getVersion​([SQLiteDatabase](https://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html "class or interface in android.database.sqlite")database,
                             @com.google.android.exoplayer2.database.VersionTable.Feature int feature,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")instanceUid)
                      throws[DatabaseIOException](DatabaseIOException.html "class in com.google.android.exoplayer2.database")

Deprecated.

Returns the version of a specified instance of a feature, or VERSION_UNSET if no version is set. Parameters:database - The database to query.feature - The feature.instanceUid - The unique identifier of the instance of the feature.Returns:The version, or VERSION_UNSET if no version is set.Throws:DatabaseIOException - If an error occurs executing the SQL.