net.sf.jbenchmark.sql
Class SQLQueryTest

java.lang.Object
  extended bynet.sf.jbenchmark.TestFeature
      extended bynet.sf.jbenchmark.Test
          extended bynet.sf.jbenchmark.sql.AbstractSQLCallTest
              extended bynet.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

Field Summary
 
Fields inherited from class net.sf.jbenchmark.sql.AbstractSQLCallTest
connection, LOG, sqlArguments
 
Constructor Summary
SQLQueryTest()
           
 
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 net.sf.jbenchmark.sql.AbstractSQLCallTest
addSqlCallArgument, doCleanup, doInitialise, doRun, executeResult, getSqlArguments, setSqlArguments
 
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
 

Constructor Detail

SQLQueryTest

public SQLQueryTest()
Method Detail

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.