Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.heckmansoft.surjey.model.datastore
Class DAO

    java.lang.Object
      com.heckmansoft.surjey.model.datastore.DAO

public class DAO
extends java.lang.Object

Abstract and regulate access to DataSource. Based on the "Singleton Pattern".

Field Summary
`protected javax.sql.DataSource` | `data_source`

Method Summary
`java.sql.Connection` | `getConnection(boolean autoCommit)` Get a new connection to the database.
`static DAO` | `getInstance()` Retrieve the single DAO instance.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### data_source

    protected javax.sql.DataSource data_source

Method Detail

### getInstance

    public static DAO getInstance()

  Retrieve the single DAO instance.

  Returns:
    The DAO

### getConnection

    public java.sql.Connection getConnection(boolean autoCommit)
                                      throws java.sql.SQLException

  Get a new connection to the database.

  Parameters:
    `autoCommit` - Enable auto commit
  Returns:
    New connection to the database
  Throws:
    `java.sql.SQLException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD