org.teiid.connector.language
Interface IParameter

All Superinterfaces:
ILanguageObject, IMetadataReference<Parameter>

public interface IParameter
extends ILanguageObject, IMetadataReference<Parameter>

Represents an execution parameter.


Nested Class Summary
static class IParameter.Direction
           
 
Method Summary
 IParameter.Direction getDirection()
          Get direction of parameter
 int getIndex()
          Get index of this parameter in the IExecution.
 java.lang.Class getType()
          Get type of parameter, defined as a Java class.
 java.lang.Object getValue()
          Get value of object if this is an IN parameter.
 boolean getValueSpecified()
          Determine whether a value was set for this parameter.
 void setDirection(IParameter.Direction direction)
          Set direction of parameter
 void setIndex(int index)
          Set index of this parameter in the IExecution.
 void setType(java.lang.Class type)
          Set type of parameter, defined as a Java class.
 void setValue(java.lang.Object value)
          Set value of object if this is an IN parameter.
 void setValueSpecified(boolean specified)
          Indicate that a value was specified for this parameter.
 
Methods inherited from interface org.teiid.connector.language.ILanguageObject
acceptVisitor
 
Methods inherited from interface org.teiid.connector.language.IMetadataReference
getMetadataObject
 

Method Detail

getIndex

int getIndex()
Get index of this parameter in the IExecution.

Returns:
Index of the parameter

getDirection

IParameter.Direction getDirection()
Get direction of parameter

Returns:
Direction
See Also:
IParameter.Direction.IN, IParameter.Direction.OUT, IParameter.Direction.INOUT, IParameter.Direction.RETURN

getType

java.lang.Class getType()
Get type of parameter, defined as a Java class. Output result sets will return "java.sql.ResultSet".

Returns:
Type of parameter

getValue

java.lang.Object getValue()
Get value of object if this is an IN parameter.

Returns:
Value of IN parameter or null otherwise

getValueSpecified

boolean getValueSpecified()
Determine whether a value was set for this parameter. This will only return true if this parameter is an IN or INOUT parameter and a value was set by the caller. If no value was set, then this parameter was determined to be optional and has no default value. Connectors may deal with this optional parameter as necessary, perhaps by using named parameters when executing the procedure to avoid unspecified inputs.

Returns:
True if IN or INOUT and no value was set
Since:
4.3.2

setIndex

void setIndex(int index)
Set index of this parameter in the IExecution.

Parameters:
index - Index of the parameter

setDirection

void setDirection(IParameter.Direction direction)
Set direction of parameter

Parameters:
direction - Direction
See Also:
IParameter.Direction.IN, IParameter.Direction.OUT, IParameter.Direction.INOUT, IParameter.Direction.RETURN

setType

void setType(java.lang.Class type)
Set type of parameter, defined as a Java class. Output result sets will return "java.sql.ResultSet".

Parameters:
type - Type of parameter

setValue

void setValue(java.lang.Object value)
Set value of object if this is an IN parameter. If value is non-null, the valueSpecified attribute will be automatically set. If null, callers must also call setValueSpecified(boolean) to indicate whether the null was a missing or actual value.

Parameters:
value - Value of IN parameter or null otherwise

setValueSpecified

void setValueSpecified(boolean specified)
Indicate that a value was specified for this parameter. If no value was specified, the connector must deal with the optional parameter as necessary.

Parameters:
specified - True if value was specified
Since:
4.3.2


Copyright © 2009. All Rights Reserved.