DAOPlayer

com.j0h1.contour.server.dao

## Interface DAOPlayer

- All Known Implementing Classes:
    DAOPlayerImpl

      public interface DAOPlayer

  Defines database access methods concerning Player objects.
  Author:
    Johannes Riedmann

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Player` | `findPlayerByPhoneId(java.lang.String phoneId)` Queries the database for a player with a specific phoneId.
    `Player` | `persist(Player player)` Persists a new Player to the database.

- - ### Method Detail

    - #### findPlayerByPhoneId

          Player findPlayerByPhoneId(java.lang.String phoneId)
                              throws DAOPlayerException

      Queries the database for a player with a specific phoneId.
      Parameters:
        `phoneId` - Unique Android device identifier for the player's phone.
      Returns:
        Fully specified Player object. Empty Player object is player was not found.
      Throws:
        `DAOPlayerException` - When the query fails, a DAOPlayerException is thrown.

    - #### persist

          Player persist(Player player)
                  throws DAOPlayerException

      Persists a new Player to the database.
      Parameters:
        `player` - Player object to be persisted.
      Returns:
        Fully specified Player object. Empty Player object is player was not persisted successfully.
      Throws:
        `DAOPlayerException` - When persistence fails, a DAOPlayerException is thrown.