public interface Database
Modifier and Type | Method and Description |
---|---|
double[] |
getAllRatingsByDate()
Return an array of your ratings ordered by date.
|
java.util.List<FinishedMatch> |
getFinishedMatches(int pid)
Get a List of matches that you have played against this player.
|
java.util.List<GroupOfPlayers> |
getGroupsOfPlayers()
Get all of the GroupOfPlayers
|
Player |
getPlayer(int id)
Find this player based on his id
|
Player |
getPlayer(java.lang.String name)
Find this Player based on his name
|
void |
setActiveProfile(int activeProfile)
Set the active Profile.
|
void |
store(FinishedMatch finishedMatch)
Store this FinishedMatch to the database
|
void |
store(java.util.List<GroupOfPlayers> groupList)
Store all of the GroupOfPlayers.
|
void |
store(Player player)
Write this player to the database
|
void |
updateOpponent(Player p)
Update the opponent with the data that we have.
|
void setActiveProfile(int activeProfile)
activeProfile
- Which profileId the user logged in as.void store(Player player)
player
- The player to write.Player getPlayer(int id)
id
- The player id to queryPlayer getPlayer(java.lang.String name)
name
- The Player name to queryvoid store(FinishedMatch finishedMatch)
finishedMatch
- the match we just finisheddouble[] getAllRatingsByDate()
actvieProfile
- which user are you currently playing as.void updateOpponent(Player p)
p
- The Player to updatejava.util.List<FinishedMatch> getFinishedMatches(int pid)
pid
- The playerid to query.java.util.List<GroupOfPlayers> getGroupsOfPlayers()
void store(java.util.List<GroupOfPlayers> groupList)
GroupOfPlayers
's dirty flag to save disk accesses.groupList
- The master list