app/src/main/java/com/example/android/popularmoviesapp/sync/MoviesSyncer.java
long insertOrUpdate(long movieId, String title, String posterUrl, String overview,
                               double rating, double popularity, String release, int favorite) {

        if (isMovieInDb(movieId)) {
            return updateMovie(movieId, rating, popularity);
        } else {
            return insertMovie(movieId, title, posterUrl, overview, rating, popularity,
                    release, favorite);
        }

    }
/**
     * @return movieId upon insert and number of rows updated upon update
     */
@return movieId upon insert and number of rows updated upon update
@return movieId upon insert and number of rows updated upon update
long insertOrUpdate(long movieId, String title, String posterUrl, String overview,
                               double rating, double popularity, String release, int favorite) {
        if (isMovieInDb(movieId)) {
            return updateMovie(movieId, rating, popularity);
        } else {
            return insertMovie(movieId, title, posterUrl, overview, rating, popularity,
                    release, favorite);
        }
    }
long insertOrUpdate ( long movieId , String title , String posterUrl , String overview , double rating , double popularity , String release , int favorite ) { if ( isMovieInDb ( movieId ) ) { return updateMovie ( movieId , rating , popularity ) ; } else { return insertMovie ( movieId , title , posterUrl , overview , rating , popularity , release , favorite ) ; } }
@return movieId upon insert and number of rows updated upon update
@return movieId upon insert and number of rows updated upon update