Tuscany DAS for Relational Databases

org.apache.tuscany.das.rdb
Interface Parameter

All Known Implementing Classes:
ParameterImpl

public interface Parameter

Describes a single parameter for a parameterized SQL statement.


Field Summary
static int IN
          Value for "Direction" that indicates that a parameter is soley for input.
static int IN_OUT
          Value for "Direction" that indicates that a parameter is for both input and output.
static int OUT
          Value for "Direction" that indicates that a parameter is soley for output.
 
Method Summary
 Converter getConverter()
          TODO Not sure this is is needed.
 int getDirection()
           
 int getIndex()
           
 String getName()
           
 Type getType()
           
 Object getValue()
           
 void setConverter(Converter converter)
          TODO Not sure this method is needed.
 void setDirection(int direction)
          Parameters are typically IN and this is the default.
 void setIndex(int index)
          Set the index of the parameter.
 void setName(String name)
          Sets the name of the parameter
 void setType(Type type)
          A parameter has a type in terms of SDO2 DataTypes.
 void setValue(Object value)
          Sets the value of the parameter.
 

Field Detail

IN

static final int IN
Value for "Direction" that indicates that a parameter is soley for input.

See Also:
Constant Field Values

OUT

static final int OUT
Value for "Direction" that indicates that a parameter is soley for output. Out parameters only apply to Stored Procedures

See Also:
Constant Field Values

IN_OUT

static final int IN_OUT
Value for "Direction" that indicates that a parameter is for both input and output. In-out parameters only apply to stored procedures

See Also:
Constant Field Values
Method Detail

setType

void setType(Type type)
A parameter has a type in terms of SDO2 DataTypes. Legal values are provided in SDODataTypes

Explicit definition of type is required only for OUT parameters of stored procedures commands

Parameters:
type -

setIndex

void setIndex(int index)
Set the index of the parameter. For example, if a SQL statement requires two parameters, the first one has an index of one.

Parameters:
index - The index of the parameter

setName

void setName(String name)
Sets the name of the parameter

Parameters:
name - the parameter name

setValue

void setValue(Object value)
Sets the value of the parameter. All IN and IN_OUT parameters must be set beore a command can be executed.

Parameters:
value - The value for the parameter

setDirection

void setDirection(int direction)
Parameters are typically IN and this is the default. A parameter's direction must be set when the parameter is OUT or IN_OUT.

Parameters:
direction - the parameters direction

setConverter

void setConverter(Converter converter)
TODO Not sure this method is needed.

Parameters:
converter -

getType

Type getType()
Returns:
the type of the paramater in terms of SDODataTypes

getConverter

Converter getConverter()
TODO Not sure this is is needed.

Returns:

getIndex

int getIndex()
Returns:
the index of the parameter

getName

String getName()
Returns:
the name of the parameter

getValue

Object getValue()
Returns:
the value of the parameter

getDirection

int getDirection()
Returns:
the direction of the parameter

Tuscany DAS for Relational Databases

-