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