Package 

Interface MediaStore

    • Method Summary

      Modifier and Type Method Description
      abstract long getFileSize() Gets the size of the backing database file.
      abstract boolean compact() Compacts the physical database file size by running the SQLiteVACUUM statement.
      abstract <E extends IdentifiableEntity> E refreshEntity(@Nullable() E entity) Refresh the given entity.
      abstract void onCreated(int version) Called when new EntityDataStore has been created.
      abstract void onUpgraded(int oldVersion, int newVersion) Called when the EntityDataStore has been upgraded from an previous versionto a new version.
      abstract <T extends IdentifiableEntity> T saveEntity(@NonNull() T entity) Inserts or updates the given entity.
      abstract boolean deleteEntity(@Nullable() IdentifiableEntity entity) Deletes an identifiable entity from the store.
      abstract <T extends IdentifiableEntity> T saveOfflineVideo(Video video) Updates the entity with given unique video identifier to save the video metadata object,while retaining the previously saved license information.
      abstract <T extends IdentifiableEntity> T saveOfflineLicense(@NonNull() Video video) Updates the entity with given unique video identifier to save the video license information.
      abstract <T extends IdentifiableEntity> T findOfflineVideo(@NonNull() String videoId) Finds the first offline video entity with the given video identifier.
      abstract boolean deleteOfflineVideo(@NonNull() String videoId) Deletes the first offline video entity with the given video identifier.
      abstract Uri findOfflineAssetUri(@Nullable() Uri uri) Finds the local URI of a remote asset that has been downloaded successfully.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getFileSize

         abstract long getFileSize()

        Gets the size of the backing database file.

      • compact

         abstract boolean compact()

        Compacts the physical database file size by running the SQLiteVACUUM statement.

      • refreshEntity

        @Nullable() abstract <E extends IdentifiableEntity> E refreshEntity(@Nullable() E entity)

        Refresh the given entity. This refreshes the already loaded properties in the entity.If no properties are loaded then the default properties will be loaded.

        Parameters:
        entity - reference to the entity to be refreshed.
      • onCreated

         abstract void onCreated(int version)

        Called when new EntityDataStore has been created. Override this method to setupthe default state of the entity store.

        Parameters:
        version - schema version of the store.
      • onUpgraded

         abstract void onUpgraded(int oldVersion, int newVersion)

        Called when the EntityDataStore has been upgraded from an previous versionto a new version.

        Parameters:
        oldVersion - the old schema version
        newVersion - the new schema version
      • saveOfflineVideo

        @NonNull() abstract <T extends IdentifiableEntity> T saveOfflineVideo(Video video)

        Updates the entity with given unique video identifier to save the video metadata object,while retaining the previously saved license information.

        Parameters:
        video - the video to be saved.
      • deleteOfflineVideo

         abstract boolean deleteOfflineVideo(@NonNull() String videoId)

        Deletes the first offline video entity with the given video identifier.

        Parameters:
        videoId - the unique video identifier.
      • findOfflineAssetUri

        @Nullable() abstract Uri findOfflineAssetUri(@Nullable() Uri uri)

        Finds the local URI of a remote asset that has been downloaded successfully.

        Parameters:
        uri - the remote URI to the asset.