Interface PlayerDao


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

      • insert

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

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

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

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

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

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

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

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

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

        LiveData<Player> select​(long id)
        Queries the database for a specific player, based on id.
        Parameters:
        id - The player's id.
        Returns:
        LiveData of the selected player.
      • selectAll

        LiveData<List<Player>> selectAll()
        Queries the database for all players.
        Returns:
        LiveData with a List of all players.
      • selectWithOauth

        LiveData<Player> selectWithOauth​(String oauth)
        Queries the database for a specific player, based on OAuth key.
        Parameters:
        oauth - The player's OAuth key.
        Returns:
        LiveData of the selected player.