Skip to content
Snippets Groups Projects
Commit 1cc1d499 authored by Erik Moravec's avatar Erik Moravec
Browse files

doc: added documenation to GameService

parent fbbb5d54
No related branches found
No related tags found
No related merge requests found
......@@ -18,13 +18,38 @@ public interface GameService {
*/
Collection<Game> getAllGames();
/**
* Create a new entity game in DB.
* @param game the game to be created.
*/
void createGame(Game game);
/**
* Finds the game by given id.
* @param gameId ID of the game to be found.
* @return return Optional of the game to be found.
*/
Optional<Game> findGame(long gameId);
/**
* Removes a game entity from DB.
* @param game the entity to be removed
*/
void deleteGame(Game game);
/**
* Updates the score of a game and the winner if a winner is
* determined by the new score.
* @param game the entity to be updated.
* @param homeTeamScore new score of the home team.
* @param awayTeamScore new score of the away team.
*/
void updateGameScore(Game game, int homeTeamScore, int awayTeamScore);
/**
* Sets the winner of a game.
* @param game the entity to be updated.
* @param team the new winner of the game.
*/
void setGameWinner(Game game, Team team);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment