|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jbenchmark.TestFeature net.sf.jbenchmark.Test net.sf.jbenchmark.sql.AbstractSQLCallTest
Anything associated with a benchmark test for DB interactions can extend this class.
Field Summary | |
protected java.sql.Connection |
connection
Connection initialised in doInitialise() . |
protected static java.util.logging.Logger |
LOG
Standard logger. |
protected java.util.List |
sqlArguments
List of arguments for the prepared statement. |
Constructor Summary | |
AbstractSQLCallTest()
|
Method Summary | |
void |
addSqlCallArgument(SQLCallArgument argument)
Add a stored procedure argument. |
protected void |
doCleanup()
Close the connection at the end of the test. |
protected void |
doInitialise()
Initialise the connection that is used in the test. |
protected TestResult |
doRun()
If there are any requirements to report on the stored procedure, one may create an SQLTestResult that extends TestResult and report on more than just basics, but for now, just return a new result. |
protected abstract void |
doValidate()
Validation is performed just before initialisation occurs and should validate that all of the required attributes for subclasses have been specified. |
void |
executeResult()
Exceutes the stored procedure and returns the result. |
protected abstract java.sql.PreparedStatement |
getPreparedStatement()
Implementing classes should return a prepared statement. |
java.util.List |
getSqlArguments()
List of all the arguments for the stored procedure. |
void |
setSqlArguments(java.util.List sqlArguments)
List of all the arguments for the stored procedure. |
Methods inherited from class net.sf.jbenchmark.Test |
addAssertion, addFeature, addResource, finish, getFeatureContext, getResource, run, setContext |
Methods inherited from class net.sf.jbenchmark.TestFeature |
getContext, getName, setName, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final java.util.logging.Logger LOG
protected java.util.List sqlArguments
protected java.sql.Connection connection
doInitialise()
.
Constructor Detail |
public AbstractSQLCallTest()
Method Detail |
public java.util.List getSqlArguments()
public void setSqlArguments(java.util.List sqlArguments)
public void addSqlCallArgument(SQLCallArgument argument)
protected abstract void doValidate()
protected TestResult doRun() throws java.lang.Exception
doRun
in class Test
java.lang.Exception
public void executeResult() throws java.lang.Exception
java.lang.Exception
protected abstract java.sql.PreparedStatement getPreparedStatement() throws java.sql.SQLException
java.sql.SQLException
protected void doInitialise() throws java.lang.Exception
doInitialise
in class Test
java.lang.Exception
protected void doCleanup() throws java.lang.Exception
doCleanup
in class Test
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |