AbstractDAO

com.j0h1.contour.server.dao

## Class AbstractDAO

- java.lang.Object
- - com.j0h1.contour.server.dao.AbstractDAO

- Direct Known Subclasses:
    DAOImageImpl, DAOPlayerImpl, DAOSessionImpl, DAOTrackImpl

      public abstract class AbstractDAO
      extends java.lang.Object

  Encapsulates methods that are used by all DAO implementations.
  Author:
    Johannes Riedmann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractDAO()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `closeConnection()` Closes the connection to the database.
    `void` | `openConnection()` Opens the connection to the database.
    `void` | `setAutoCommit(boolean autoCommit)` Enables auto-commit if parameter autoCommit is true, disables it otherwise.

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

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

- - ### Constructor Detail

    - #### AbstractDAO

          public AbstractDAO()

  - ### Method Detail

    - #### openConnection

          public void openConnection()

      Opens the connection to the database.

    - #### closeConnection

          public void closeConnection()

      Closes the connection to the database.

    - #### setAutoCommit

          public void setAutoCommit(boolean autoCommit)
                             throws DAOException

      Enables auto-commit if parameter autoCommit is true, disables it otherwise.
      Parameters:
        `autoCommit` - To disable/enable auto-commit for database.
      Throws:
        `DAOException` - If auto-commit could not be set, throw DAOException.