DAOPlayerImpl

com.j0h1.contour.admin.server.dao.impl

## Class DAOPlayerImpl

- java.lang.Object
- - com.j0h1.contour.admin.server.dao.AbstractDAO
  - - com.j0h1.contour.admin.server.dao.impl.DAOPlayerImpl

- All Implemented Interfaces:
    DAOPlayer

      public class DAOPlayerImpl
      extends AbstractDAO
      implements DAOPlayer

  Implementations for DAOPlayer.
  Author:
    Johannes Riedmann

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.sql.Connection` | `connection`
    `private DatabaseManager` | `dbm`
    `private java.sql.PreparedStatement` | `prep`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DAOPlayerImpl()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `delete(int playerId)` Deletes the player with the specified playerId and all his drawing sessions/drawings (all data associated with this player).
    `java.util.ArrayList<Player>` | `findAll()` Returns all persisted players.

    - ### Methods inherited from class com.j0h1.contour.admin.server.dao.AbstractDAO

      `closeConnection, openConnection, setAutoCommit`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### connection

          private java.sql.Connection connection

    - #### prep

          private java.sql.PreparedStatement prep

    - #### dbm

          private DatabaseManager dbm

  - ### Constructor Detail

    - #### DAOPlayerImpl

          public DAOPlayerImpl()

  - ### Method Detail

    - #### findAll

          public java.util.ArrayList<Player> findAll()
                                              throws DAOPlayerException

      Description copied from interface: `DAOPlayer`
      Returns all persisted players.
      Specified by:
        `findAll` in interface `DAOPlayer`
      Returns:
        see description
      Throws:
        `DAOPlayerException` - If query fails, provides specific feedback.

    - #### delete

          public void delete(int playerId)
                      throws DAOPlayerException

      Description copied from interface: `DAOPlayer`
      Deletes the player with the specified playerId and all his drawing sessions/drawings (all data associated with this player).
      Specified by:
        `delete` in interface `DAOPlayer`
      Parameters:
        `playerId` - ID of player to be deleted.
      Throws:
        `DAOPlayerException` - If deletion fails, provides specific feedback.