net.sf.jbenchmark.sql
Class SQLCallArgument

java.lang.Object
  extended bynet.sf.jbenchmark.TestFeature
      extended bynet.sf.jbenchmark.sql.SQLCallArgument

public class SQLCallArgument
extends TestFeature

Stored Procedure arguments are nested XML arguments for a StoredProcedureTest element. These currently represent an ordered list of arguments that a stored procedure needs to complete its work. Only parameters that are of type TYPE_IN do any work. Only a small subset of types from JDBC are currently supported.

Version:
$Id: SQLCallArgument.java,v 1.1 2004/07/02 02:40:23 twpatkua Exp $
Author:
Patrick Kua

Field Summary
static java.lang.String DATATYPE_BOOLEAN
          Type for the boolean types.
static java.lang.String DATATYPE_DATE
          Type for date types.
static java.lang.String DATATYPE_LONG
          Type for long numbers.
static java.lang.String DATATYPE_STRING
          Type for string types.
static java.lang.String[] SUPPORTED_DATATYPES
          List of all of the data types that are currently supported for stored procedures
static java.lang.String[] SUPPORTED_TYPES
          List of all of thet types that are currently supported.
static java.lang.String TYPE_IN
          Type for in paramter.
static java.lang.String TYPE_OUT
          Type for out parameter.
 
Constructor Summary
SQLCallArgument()
           
 
Method Summary
 java.lang.String getDatatype()
          The datatype of the value that this stored procedure argument has.
 java.lang.String getType()
          The type of the stored procedure argument.
 java.lang.String getValue()
          The value for this stored procedure argument.
 java.lang.Object getValueAsObject()
          Returns the value as the correct type of object.
 void setDatatype(java.lang.String datatype)
          The datatype of the value that this stored procedure argument has.
 void setType(java.lang.String type)
          The type of the stored procedure argument.
 void setValue(java.lang.String value)
          The value for this stored procedure argument.
 java.lang.String toString()
          Standard toString().
 
Methods inherited from class net.sf.jbenchmark.TestFeature
finish, getContext, getName, setContext, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATATYPE_DATE

public static final java.lang.String DATATYPE_DATE
Type for date types.

See Also:
Constant Field Values

DATATYPE_STRING

public static final java.lang.String DATATYPE_STRING
Type for string types.

See Also:
Constant Field Values

DATATYPE_LONG

public static final java.lang.String DATATYPE_LONG
Type for long numbers.

See Also:
Constant Field Values

DATATYPE_BOOLEAN

public static final java.lang.String DATATYPE_BOOLEAN
Type for the boolean types.

See Also:
Constant Field Values

TYPE_IN

public static final java.lang.String TYPE_IN
Type for in paramter.

See Also:
Constant Field Values

TYPE_OUT

public static final java.lang.String TYPE_OUT
Type for out parameter.

See Also:
Constant Field Values

SUPPORTED_DATATYPES

public static final java.lang.String[] SUPPORTED_DATATYPES
List of all of the data types that are currently supported for stored procedures


SUPPORTED_TYPES

public static final java.lang.String[] SUPPORTED_TYPES
List of all of thet types that are currently supported.

Constructor Detail

SQLCallArgument

public SQLCallArgument()
Method Detail

getType

public java.lang.String getType()
The type of the stored procedure argument.


setType

public void setType(java.lang.String type)
The type of the stored procedure argument.


getValue

public java.lang.String getValue()
The value for this stored procedure argument.


setValue

public void setValue(java.lang.String value)
The value for this stored procedure argument.


getDatatype

public java.lang.String getDatatype()
The datatype of the value that this stored procedure argument has.


setDatatype

public void setDatatype(java.lang.String datatype)
The datatype of the value that this stored procedure argument has.


getValueAsObject

public java.lang.Object getValueAsObject()
Returns the value as the correct type of object. Runtime exceptions are thrown if an inappropriate value was specified for a type (e.g. if an alphanumeric string was specified instead of a just a number for a type of DATATYPE_LONG. Booleans behave a little differently because Boolean.valueOf(java.lang.String) returns Boolean.FALSE if anything other that true is specified.


toString

public java.lang.String toString()
Standard toString().

Overrides:
toString in class TestFeature