public class PersistenceFacade
extends java.lang.Object
Constructor and Description |
---|
PersistenceFacade() |
Modifier and Type | Method and Description |
---|---|
void |
AddCommand(int gameID,
ICommand command)
Adds a command to the database
|
void |
AddGame(ServerGameManager sgm)
Adds a game to the database
|
void |
AddUser(ServerPlayer player)
Adds a user to be in the database
|
java.util.List<ICommand> |
GetAllCommands()
Get all the commands that have been played but haven't been updated into the blob
|
java.util.List<ServerGameManager> |
GetAllGames()
Gets the games
|
java.util.List<ServerPlayer> |
GetAllUsers()
Gets the most recent users
|
java.util.List<ICommand> |
GetCommands(int gameID)
Get all the commands associated with a game
|
void |
UpdateGame(ServerGameManager sgm)
Updates a game in the database
|
public java.util.List<ServerPlayer> GetAllUsers()
public java.util.List<ServerGameManager> GetAllGames()
public java.util.List<ICommand> GetAllCommands()
public java.util.List<ICommand> GetCommands(int gameID)
gameID
- the game IDpublic void AddUser(ServerPlayer player)
player
- public void AddGame(ServerGameManager sgm)
sgm
- the server game manager topublic void UpdateGame(ServerGameManager sgm) throws PersistenceException
sgm
- PersistenceException
public void AddCommand(int gameID, ICommand command)
gameID
- command
-