Interface SiteDao


public interface SiteDao
Interface describing the operations allowed on sites in database.
Author:
andresbustamante
  • Method Details

    • findSitesByPlayer

      List<Site> findSitesByPlayer(@Param("player") Player player)
      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

      Site findSiteById(@Param("id") Integer id)
      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

      int saveSite(@Param("site") Site site, @Param("player") Player author)
      Creates a site in database.
      Parameters:
      site - Site to create
      author - Player creating the site
      Returns:
      Number of created sites. It should be 0 or 1