org.apache.beehive.controls.system.jdbc
Class JdbcControl.SQLParameter

Object
  extended by JdbcControl.SQLParameter
Enclosing interface:
JdbcControl

public static class JdbcControl.SQLParameter
extends Object

Nested class used for specifing parameters for a callable statement. If a method in a control extension takes an array of SQLParameter, the JdbcControl treats the SQL as a CallableStatement and inserts values into the statement from the SQLParameter array. After the CallableStatement executes, results are mapped into OUT type parameters found int the SQLParameter array. NOTE: To invoke a callable statement which does not take any arguments, an SQLParameter array of size zero must be passed to the JDBCControl method.


Field Summary
 int dir
          Parameter direction.
static int IN
          IN direction constant.
static int INOUT
          IN and OUT directions constant.
static int OUT
          OUT direction constant.
 int type
          Parameter SQL data type.
 Object value
          Parameter value.
 
Constructor Summary
JdbcControl.SQLParameter(Object value)
          Create a new SQLParameter with the specified value.
JdbcControl.SQLParameter(Object value, int type)
          Create a new SQLParameter with the specified value and SQL data type.
JdbcControl.SQLParameter(Object value, int type, int dir)
          Create a new SQLParameter with the specified value, SQL data type and direction.
 
Method Summary
 Object clone()
          Clone this parameter.
 
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IN

public static final int IN
IN direction constant.

See Also:
Constant Field Values

OUT

public static final int OUT
OUT direction constant.

See Also:
Constant Field Values

INOUT

public static final int INOUT
IN and OUT directions constant.

See Also:
Constant Field Values

value

public Object value
Parameter value. For parameters of type OUT this value should be set to null.


type

public int type
Parameter SQL data type. See java.sql.Types.


dir

public int dir
Parameter direction.

Constructor Detail

JdbcControl.SQLParameter

public JdbcControl.SQLParameter(Object value)
Create a new SQLParameter with the specified value.

Parameters:
value - The parameter value.

JdbcControl.SQLParameter

public JdbcControl.SQLParameter(Object value,
                                int type)
Create a new SQLParameter with the specified value and SQL data type.

Parameters:
value - The parameter value.
type - SQL data type.

JdbcControl.SQLParameter

public JdbcControl.SQLParameter(Object value,
                                int type,
                                int dir)
Create a new SQLParameter with the specified value, SQL data type and direction.

Parameters:
value - The parameter value.
type - SQL data type.
dir - IN / OUT or INOUT
Method Detail

clone

public Object clone()
Clone this parameter.

Overrides:
clone in class Object
Returns:
A copy of this parameter.