com.zphinx.spine.data.impl
Class AbstractDataBaseDAO

java.lang.Object
  extended by com.zphinx.spine.data.DataAbstract
      extended by com.zphinx.spine.data.impl.AbstractDataBaseDAO
All Implemented Interfaces:
DataAccessObject, DataBaseHelper

public abstract class AbstractDataBaseDAO
extends DataAbstract
implements DataBaseHelper

AbstractDataBaseDAO is the abstract implementation of DataAbstract which uses a database for its persistence layer.
DataAccessObjects which use a database should extend this class

Version:
$1.0

Copyright ©Zphinx Software Solutions

Author:
David Ladapo

Constructor Summary
AbstractDataBaseDAO()
          Public Constructor
 
Method Summary
 boolean close()
          Closes the database connection
protected  DataPack createDataPack(int i, String tableName, String setClause)
          Creates a DataPack
protected  Connection getConnection()
          Gets a Connection object
 void setConnection(Connection myConnection)
          Sets the connection for use by AbstractDataBaseDAO objects
 
Methods inherited from class com.zphinx.spine.data.DataAbstract
fetchData, getErrors, getStoreType, setErrors, setStoreType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDataBaseDAO

public AbstractDataBaseDAO()
Public Constructor

Method Detail

setConnection

public void setConnection(Connection myConnection)
Description copied from interface: DataBaseHelper
Sets the connection for use by AbstractDataBaseDAO objects

Specified by:
setConnection in interface DataBaseHelper

getConnection

protected Connection getConnection()
Gets a Connection object

Returns:
Returns the connection.

createDataPack

protected DataPack createDataPack(int i,
                                  String tableName,
                                  String setClause)
Creates a DataPack

Parameters:
i - The size of the dataPack to create
tableName - The name of the table to access
setClause - The setClause within the prepared statement
Returns:
A DataPack for use by a prepared statement

close

public boolean close()
Closes the database connection

Specified by:
close in interface DataAccessObject
Specified by:
close in class DataAbstract
Returns:
True if the operation succeeds