コード例 #1
0
 @Override
 public void loadFavoriteMoviesFromDb(
     List<MovieItem> items, SyncCallback<List<MovieItem>> mCallback) {
   LoadFavoriteMoviesFromDb loadFavoriteMoviesFromDb =
       new LoadFavoriteMoviesFromDb(SyncDbAction.LOAD_UPDATE_STATUS.getId(), items, mCallback);
   dbThread.addDatabasebSyncTask(loadFavoriteMoviesFromDb);
 }
コード例 #2
0
  @Override
  public void loadMovieStatusFromDb(MovieItem item, SyncCallback<MovieItem> mCallback) {

    AbstractInsertUpdateDeleteMovieDbSyncTask insertUpdateDeleteMovieDbSyncTask =
        new LoadMovieStatusDbSyncTask(SyncDbAction.LOAD_UPDATE_STATUS.getId(), item, mCallback);
    dbThread.addDatabasebSyncTask(insertUpdateDeleteMovieDbSyncTask);
  }
コード例 #3
0
 @Override
 public void loadGenres(SyncCallback<List<GenreItem>> callback) {
   LoadGenresSyncTaskDb loadGenres =
       new LoadGenresSyncTaskDb(SyncDbAction.LOAD_GENRES.getId(), callback);
   dbThread.addDatabasebSyncTask(loadGenres);
 }
コード例 #4
0
 @Override
 public void insertOrUpdateGenresToDb(List<GenreItem> genreItems) {
   InsertOrUpdateGenresTask insertOrUpdateGenresTask =
       new InsertOrUpdateGenresTask(SyncDbAction.INSERT_UPDATE_GENRE.getId(), genreItems, null);
   dbThread.addDatabasebSyncTask(insertOrUpdateGenresTask);
 }
コード例 #5
0
 @Override
 public void insertOrUpdateMovieToDb(MovieItem item, SyncCallback<MovieItem> callback) {
   AbstractInsertUpdateDeleteMovieDbSyncTask insertUpdateDeleteMovieDbSyncTask =
       new InsertOrUpdateDbSyncTask(SyncDbAction.INSERT_UPDATE_MOVIE.getId(), item, callback);
   dbThread.addDatabasebSyncTask(insertUpdateDeleteMovieDbSyncTask);
 }
コード例 #6
0
 @Override
 public void deleteMoviesFromDb(List<MovieItem> items, SyncCallback<List<MovieItem>> callback) {
   DeleteMoviesDbSyncTask deleteMoviesDbSyncTask =
       new DeleteMoviesDbSyncTask(SyncDbAction.DELETE_MOVOIES.getId(), items, callback);
   dbThread.addDatabasebSyncTask(deleteMoviesDbSyncTask);
 }