Interface PlayerDao
-
public interface PlayerDao
Provides an interface with methods that perform actions on thePlayer
table of the database.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Single<Integer>
delete(Player player)
Deletes a single player from the database.Single<Integer>
delete(Player... players)
Deletes multiple players from the database.Single<Integer>
delete(Collection<Player> players)
Deletes multiple players from the database.Single<Long>
insert(Player player)
Inserts a single player into the database.Single<List<Long>>
insert(Player... players)
Inserts multiple players into the database.Single<List<Long>>
insert(Collection<Player> players)
Inserts multiple players into the database.LiveData<Player>
select(long id)
Queries the database for a specific player, based on id.LiveData<List<Player>>
selectAll()
Queries the database for all players.LiveData<Player>
selectWithOauth(String oauth)
Queries the database for a specific player, based on OAuth key.Single<Integer>
update(Player player)
Updates a single player in the database.Single<Integer>
update(Player... players)
Updates multiple players in the database.Single<Integer>
update(Collection<Player> players)
Updates multiple players in 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 aList
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 aList
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 aList
of all players.
-
-