Interface SiteDao
public interface SiteDao
Interface describing the operations allowed on sites in database.
- Author:
- andresbustamante
-
Method Summary
Modifier and TypeMethodDescriptionfindSiteById
(Integer id) Loads a site by its technical ID.findSitesByPlayer
(Player player) Looks for the sites related to a player.int
Creates a site in database.
-
Method Details
-
findSitesByPlayer
Looks for the sites related to a player. It will look in player's history to get the sites where the player has played or is planning to go to.- Parameters:
player
- Player to use for the research- Returns:
- List of sites found for the player
-
findSiteById
Loads a site by its technical ID.- Parameters:
id
- Identifier to search- Returns:
- Site identified by the number used as parameter for this method
-
saveSite
Creates a site in database.- Parameters:
site
- Site to createauthor
- Player creating the site- Returns:
- Number of created sites. It should be 0 or 1
-