org.javaWebGen.data
Interface DataManager

All Known Implementing Classes:
DerbySQLDataManager, HSQLDataManager, MSSQLDataManager, MySQLDataManager, OracleDataManager, WebLogicDataManager

public interface DataManager

Version:
$Revision: 1.1.1.1 $
Author:
Kevin Scott

Method Summary
 void close(java.sql.Connection con)
          close this connection ignoring any errors
 void endTransaction(java.sql.Connection con)
          end Db tranacton commiting any uncommited data
 java.lang.String formatDate(java.util.Date date)
          get a text String ve rsion of a date that the
 java.sql.Connection getConnection()
          get db connection
 java.util.Date getDate(java.lang.String dateStr)
          get a date from a date String based on default database format database understands
 int getNextValue(java.sql.Connection con, java.lang.String tablename)
          get next value for the primary key
 int getNextValue(java.lang.String tablename)
          get next value for the primary key
 Sequence getSequence()
           
 java.lang.String getSqlText(java.lang.String text)
          get a String that is escaped( handles ')
 java.lang.String[] getTableList()
           
 void init()
           
 void rollbackTransaction(java.sql.Connection con)
          rollback uncommited data ignoring any errors
 void setReader(PropertiesReader reader)
           
 void setSequence(Sequence seq)
          Use this sequence generator NOTE this should not be used by a calling class
 void startTransaction(java.sql.Connection con)
          start Db tranacton
 

Method Detail

setReader

void setReader(PropertiesReader reader)
Parameters:
reader -

getSequence

Sequence getSequence()

setSequence

void setSequence(Sequence seq)
Use this sequence generator NOTE this should not be used by a calling class

Parameters:
seq - sequence object

init

void init()

getConnection

java.sql.Connection getConnection()
                                  throws java.sql.SQLException
get db connection

Throws:
sql - error
java.sql.SQLException

close

void close(java.sql.Connection con)
close this connection ignoring any errors

Parameters:
con - db connection

getNextValue

int getNextValue(java.lang.String tablename)
                 throws DBException
get next value for the primary key

Parameters:
tablename - table name
Throws:
DBException

getNextValue

int getNextValue(java.sql.Connection con,
                 java.lang.String tablename)
                 throws java.sql.SQLException
get next value for the primary key

Parameters:
con - db connection
tablename - table name
Throws:
java.sql.SQLException

startTransaction

void startTransaction(java.sql.Connection con)
                      throws java.sql.SQLException
start Db tranacton

Parameters:
con - db connection
Throws:
java.sql.SQLException

endTransaction

void endTransaction(java.sql.Connection con)
                    throws java.sql.SQLException
end Db tranacton commiting any uncommited data

Parameters:
con - db connection
Throws:
java.sql.SQLException

rollbackTransaction

void rollbackTransaction(java.sql.Connection con)
rollback uncommited data ignoring any errors

Parameters:
con - db connection

formatDate

java.lang.String formatDate(java.util.Date date)
get a text String ve rsion of a date that the

Parameters:
date - to convert
Returns:
date string the database understands

getDate

java.util.Date getDate(java.lang.String dateStr)
                       throws java.text.ParseException
get a date from a date String based on default database format database understands

Parameters:
dateStr - date text
Returns:
date object
Throws:
java.text.ParseException

getSqlText

java.lang.String getSqlText(java.lang.String text)
get a String that is escaped( handles ')

Parameters:
text - sql
Returns:
sql text

getTableList

java.lang.String[] getTableList()
                                throws java.sql.SQLException
Returns:
list of current tables
Throws:
java.sql.SQLException


Copyright(C) 2003-2006 Kevin Scott - All Rights Reserved.