net.sf.jbenchmark.sql
Class SQLQueryTest
java.lang.Object
net.sf.jbenchmark.TestFeature
net.sf.jbenchmark.Test
net.sf.jbenchmark.sql.AbstractSQLCallTest
net.sf.jbenchmark.sql.SQLQueryTest
- All Implemented Interfaces:
- java.lang.Runnable
- public class SQLQueryTest
- extends AbstractSQLCallTest
A benchmark test for running queries. For those with bind parameters, the SQL specified
must have the correct syntax for bind parameters, otherwise no arguments should be provided.
If bind parameters are to be used, then the correct sequence of arguments should be provided.
- Version:
- $Id: SQLQueryTest.java,v 1.1 2004/07/02 02:40:23 twpatkua Exp $
- Author:
- Patrick Kua
Method Summary |
protected void |
doValidate()
The query string must be specified. |
protected java.sql.PreparedStatement |
getPreparedStatement()
Transform the query string into a prepared statement. |
java.lang.String |
getQueryString()
Query string for this benchmark test. |
static void |
registerBenchmarkTest(org.apache.commons.digester.Digester digester)
Register this benchmark test with the digester. |
void |
setQueryString(java.lang.String queryString)
Query string for this benchmark test. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SQLQueryTest
public SQLQueryTest()
doValidate
protected void doValidate()
- The query string must be specified.
- Specified by:
doValidate
in class AbstractSQLCallTest
getQueryString
public java.lang.String getQueryString()
- Query string for this benchmark test.
setQueryString
public void setQueryString(java.lang.String queryString)
- Query string for this benchmark test.
getPreparedStatement
protected java.sql.PreparedStatement getPreparedStatement()
throws java.sql.SQLException
- Transform the query string into a prepared statement.
- Specified by:
getPreparedStatement
in class AbstractSQLCallTest
- Throws:
java.sql.SQLException
registerBenchmarkTest
public static final void registerBenchmarkTest(org.apache.commons.digester.Digester digester)
- Register this benchmark test with the digester.
TODO: Make this autoomatically handle. Perhaps a Registerable Benchmark interface.