Interface PlayerDao


public interface PlayerDao
Interface describing the operations allowed on players in the database.
Author:
andresbustamante
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    deactivatePlayer(net.andresbustamante.yafoot.core.model.Player player)
    Logical deactivation for a player in database.
    int
    deletePlayer(net.andresbustamante.yafoot.core.model.Player player)
    Physically deletes a player from the database.
    net.andresbustamante.yafoot.core.model.Player
    Loads a player by using his/her email address.
    net.andresbustamante.yafoot.core.model.Player
    Looks for a player in the database using a technical identifier.
    boolean
    Checks if an email address is already registered for any player.
    int
    savePlayer(net.andresbustamante.yafoot.core.model.Player player)
    Creates a player in the database.
    int
    updatePlayer(net.andresbustamante.yafoot.core.model.Player player)
    Updates player's details in database.
  • Method Details

    • findPlayerById

      net.andresbustamante.yafoot.core.model.Player findPlayerById(@Param("id") Integer playerId)
      Looks for a player in the database using a technical identifier.
      Parameters:
      playerId - Identifier to search
      Returns:
      Player identified by this ID. Null if no player is found.
    • isPlayerAlreadySignedUp

      boolean isPlayerAlreadySignedUp(@Param("email") String email)
      Checks if an email address is already registered for any player.
      Parameters:
      email - Email address to search
      Returns:
      True if the address is already registered
    • savePlayer

      int savePlayer(@Param("player") net.andresbustamante.yafoot.core.model.Player player)
      Creates a player in the database.
      Parameters:
      player - Player to create
      Returns:
      Number of created players. It should be 0 or 1
    • updatePlayer

      int updatePlayer(@Param("player") net.andresbustamante.yafoot.core.model.Player player)
      Updates player's details in database.
      Parameters:
      player - Player to update
      Returns:
      Number of updated players. It should be 0 or 1
    • findPlayerByEmail

      net.andresbustamante.yafoot.core.model.Player findPlayerByEmail(@Param("email") String email)
      Loads a player by using his/her email address.
      Parameters:
      email - Email address to search
      Returns:
      Player using the email address used as parameter. Null if no player is found for that address
    • deletePlayer

      int deletePlayer(@Param("player") net.andresbustamante.yafoot.core.model.Player player)
      Physically deletes a player from the database.
      Parameters:
      player - Player to delete
      Returns:
      Number of deleted players. It should be 0 or 1
    • deactivatePlayer

      int deactivatePlayer(@Param("player") net.andresbustamante.yafoot.core.model.Player player)
      Logical deactivation for a player in database. This method will anonymize user's personal data when called.
      Parameters:
      player - Player to deactivate
      Returns:
      Number of updated players. It should be 0 or 1