예제 #1
0
 @Override
 public Observable<List<Boolean>> checkFavourite(List<Long> movieIds) {
   final MovieDataStore movieDataStore = mMovieDataStoreFactory.createContentProviderDataStore();
   return movieDataStore.checkFavourite(movieIds);
 }
예제 #2
0
 @Override
 public Observable<List<Movie>> getFavouriteMovies(String sortBy) {
   final MovieDataStore movieDataStore = mMovieDataStoreFactory.createContentProviderDataStore();
   return movieDataStore.getMovieEntityList(sortBy).map(mMovieEntityDataMapper::transform);
 }
예제 #3
0
 @Override
 public Observable<Long> insertMovie(Movie movie) {
   final MovieDataStore movieDataStore = mMovieDataStoreFactory.createContentProviderDataStore();
   return movieDataStore.insertMovieEntity(mMovieDataMapper.toMovieEntity(movie));
 }
예제 #4
0
 @Override
 public Observable<Integer> deleteMovie(long movieId) {
   final MovieDataStore movieDataStore = mMovieDataStoreFactory.createContentProviderDataStore();
   return movieDataStore.deleteMovieEntity(movieId);
 }
예제 #5
0
 @Override
 public Observable<List<Movie>> movies(String sortBy, int page) {
   final MovieDataStore movieDataStore = mMovieDataStoreFactory.createCloudMovieDataStore();
   return movieDataStore.getMovieEntityList(sortBy, page).map(mMovieEntityDataMapper::transform);
 }