Interface GameDao
-
public interface GameDaoProvides an interface with methods that perform actions on theGametable of the database.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Single<Integer>delete(Game game)Deletes a single game from the database.Single<Integer>delete(Game... games)Deletes multiple games from the database.Single<Integer>delete(Collection<Game> games)Deletes multiple games from the database.LiveData<Game>findByGameId(long id)Queries the database for a specific game, based on id.LiveData<List<Game>>findByPlayerDeckId(long id)Queries the database for all scales, based on player's deck id.Single<Long>insert(Game game)Inserts a single game into the database.Single<List<Long>>insert(Game... games)Inserts multiple games into the database.Single<List<Long>>insert(Collection<Game> games)Inserts multiple games into the database.Single<Integer>update(Game game)Updates a single game in the database.Single<Integer>update(Game... games)Updates multiple games in the database.Single<Integer>update(Collection<Game> games)Updates multiple games in 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
Singleholding 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
SingleholdingListof 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
SingleholdingListof 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
Singleholding 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
Singleholding 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
Singleholding 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
Singleholding 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
Singleholding 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
Singleholding 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:
LiveDataof the selected game.
-
-