Interface GameDao


  • public interface GameDao
    Provides an interface with methods that perform actions on the Game table of the database.
    • Method Detail

      • insert

        Single<Long> insert​(Game game)
        Inserts a single game into the database.
        Parameters:
        game - The game to be inserted.
        Returns:
        A Single holding the id of the game that was inserted.
      • insert

        Single<List<Long>> insert​(Game... games)
        Inserts multiple games into the database.
        Parameters:
        games - The games to be inserted.
        Returns:
        A Single holding List of ids of games that were inserted.
      • insert

        Single<List<Long>> insert​(Collection<Game> games)
        Inserts multiple games into the database.
        Parameters:
        games - The games to be inserted.
        Returns:
        A Single holding List of ids of games that were inserted.
      • update

        Single<Integer> update​(Game game)
        Updates a single game in the database.
        Parameters:
        game - The game to be updated.
        Returns:
        A Single holding the number of updates performed.
      • update

        Single<Integer> update​(Game... games)
        Updates multiple games in the database.
        Parameters:
        games - The games to be updated.
        Returns:
        A Single holding the number of updates performed.
      • update

        Single<Integer> update​(Collection<Game> games)
        Updates multiple games in the database.
        Parameters:
        games - The games to be updated.
        Returns:
        A Single holding the number of updates performed.
      • delete

        Single<Integer> delete​(Game game)
        Deletes a single game from the database.
        Parameters:
        game - The game to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • delete

        Single<Integer> delete​(Game... games)
        Deletes multiple games from the database.
        Parameters:
        games - The games to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • delete

        Single<Integer> delete​(Collection<Game> games)
        Deletes multiple games from the database.
        Parameters:
        games - The games to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • findByGameId

        LiveData<Game> findByGameId​(long id)
        Queries the database for a specific game, based on id.
        Parameters:
        id - The game's id.
        Returns:
        LiveData of the selected game.
      • findByPlayerDeckId

        LiveData<List<Game>> findByPlayerDeckId​(long id)
        Queries the database for all scales, based on player's deck id.
        Parameters:
        id - The player's deck id.
        Returns:
        LiveData of the selected game.