OOoRunner test harness

stats
Class SQLExecution

java.lang.Object
  |
  +--stats.SQLExecution

public class SQLExecution
extends Object


Field Summary
protected  boolean m_bConnectionOpen
           
protected  boolean m_bDebug
           
protected  Connection mConnection
           
protected  String mDbURL
           
protected  String mJdbcClass
           
protected  String mPassword
           
protected  Statement mStatement
           
protected  String mUser
           
 
Constructor Summary
SQLExecution(String jdbcClass, String dbUrl, String user, String password)
          Creates a new instance of SQLExecution
SQLExecution(String jdbcClass, String dbUrl, String user, String password, boolean debug)
          Creates a new instance of SQLExecution with additional debug output.
 
Method Summary
 boolean closeConnection()
          Close the connection to the DataBase
 boolean executeSQLCommand(String command, Hashtable sqlInput, Hashtable sqlOutput)
          Execute an sql command.
 boolean executeSQLCommand(String command, Hashtable sqlInput, Hashtable sqlOutput, boolean mergeOutputIntoInput)
          Execute an sql command.
 boolean openConnection()
          Open a connection to the DataBase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mConnection

protected Connection mConnection

mStatement

protected Statement mStatement

mJdbcClass

protected String mJdbcClass

mDbURL

protected String mDbURL

mUser

protected String mUser

mPassword

protected String mPassword

m_bConnectionOpen

protected boolean m_bConnectionOpen

m_bDebug

protected boolean m_bDebug
Constructor Detail

SQLExecution

public SQLExecution(String jdbcClass,
                    String dbUrl,
                    String user,
                    String password)
Creates a new instance of SQLExecution
Parameters:
jdbcClass - The jdbc class for the connection.
dbUrl - The url of the database.
user - The user for connecting the database.
password - The password of throws user.

SQLExecution

public SQLExecution(String jdbcClass,
                    String dbUrl,
                    String user,
                    String password,
                    boolean debug)
Creates a new instance of SQLExecution with additional debug output.
Parameters:
jdbcClass - The jdbc class for the connection.
dbUrl - The url of the database.
user - The user for connecting the database.
password - The password of throws user.
debug - Write debug information, if true.
Method Detail

openConnection

public boolean openConnection()
Open a connection to the DataBase
Returns:
True, if no error occured.

closeConnection

public boolean closeConnection()
Close the connection to the DataBase
Returns:
True, if no error occured.

executeSQLCommand

public boolean executeSQLCommand(String command,
                                 Hashtable sqlInput,
                                 Hashtable sqlOutput)
                          throws IllegalArgumentException
Execute an sql command.
Parameters:
command - The command to execute.
sqlInput - Input values for the command.
sqlOutput - The results of the command are put in this Hashtable.
Returns:
True, if no error occured.

executeSQLCommand

public boolean executeSQLCommand(String command,
                                 Hashtable sqlInput,
                                 Hashtable sqlOutput,
                                 boolean mergeOutputIntoInput)
                          throws IllegalArgumentException
Execute an sql command.
Parameters:
command - The command to execute.
sqlInput - Input values for the command.
sqlOutput - The results of the command are put in this Hashtable.
mergeOutputIntoInput - The output of the result is put into the sqlInput Hashtable.
Returns:
True, if no error occured.

OOoRunner test harness