Apache JMeter
2.1.1

org.apache.jmeter.protocol.jdbc.sampler
Class JDBCSampler

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.samplers.AbstractSampler
          extended byorg.apache.jmeter.protocol.jdbc.sampler.JDBCSampler
All Implemented Interfaces:
Cloneable, Sampler, Serializable, TestBean, TestElement

public class JDBCSampler
extends AbstractSampler
implements TestBean

A sampler which understands JDBC database requests.

Version:
$Revision: 1.37.2.1 $
Author:
Original author unknown, Jeremy Arnold
See Also:
Serialized Form

Field Summary
 String dataSource
           
 String query
           
static String QUERY
           
 String queryType
           
static String SELECT
           
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
JDBCSampler()
          Creates a JDBCSampler.
 
Method Summary
 String getDataSource()
           
 String getQuery()
           
 String getQueryType()
           
 SampleResult sample(Entry e)
          Obtains statistics about the given Entry, and packages the information into a SampleResult.
 void setDataSource(String dataSource)
           
 void setQuery(String query)
           
 void setQueryType(String queryType)
           
 String toString()
           
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jmeter.testelement.TestElement
addTestElement, canRemove, clear, clone, getProperty, getPropertyAsBoolean, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse
 

Field Detail

QUERY

public static final String QUERY
See Also:
Constant Field Values

SELECT

public static final String SELECT
See Also:
Constant Field Values

query

public String query

dataSource

public String dataSource

queryType

public String queryType
Constructor Detail

JDBCSampler

public JDBCSampler()
Creates a JDBCSampler.

Method Detail

sample

public SampleResult sample(Entry e)
Description copied from interface: Sampler
Obtains statistics about the given Entry, and packages the information into a SampleResult.

Specified by:
sample in interface Sampler

getQuery

public String getQuery()

toString

public String toString()

setQuery

public void setQuery(String query)
Parameters:
query - The query to set.

getDataSource

public String getDataSource()
Returns:
Returns the dataSource.

setDataSource

public void setDataSource(String dataSource)
Parameters:
dataSource - The dataSource to set.

getQueryType

public String getQueryType()
Returns:
Returns the queryType.

setQueryType

public void setQueryType(String queryType)
Parameters:
queryType - The queryType to set.

Apache JMeter
2.1.1

Copyright © 1998-2005 Apache Software Foundation. All Rights Reserved.