stats
Class SQLExecution
java.lang.Object
|
+--stats.SQLExecution
- public class SQLExecution
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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.
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.