|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.query.sql.lang.SPParameter
public class SPParameter
Represents a StoredProcedure's parameter for encapsulation in the Query framework This is basically a holder object set from the Server's implementation of a stored procedure. The connector will utilize this class to set the appropriate values at the datasource layer.
Field Summary | |
---|---|
static int |
IN
Constant identifying an IN parameter |
static int |
INOUT
Constant identifying an INOUT parameter |
static int |
OUT
Constant identifying an OUT parameter |
static int |
RESULT_SET
Constant identifying a RESULT SET parameter |
static int |
RETURN_VALUE
Constant identifying a RETURN parameter |
Constructor Summary | |
---|---|
SPParameter(int index,
Expression expression)
Constructor used when constructing a parameter during execution. |
|
SPParameter(int index,
int parameterType,
java.lang.String name)
Constructor used when constructing a parameter from metadata. |
Method Summary | |
---|---|
void |
addResultSetColumn(java.lang.String name,
java.lang.Class type,
java.lang.Object id)
Add a result set column if this parameter is a return result set. |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
Checks whether another parameter equals this one based on the index. |
java.lang.Class |
getClassType()
Get class type - MetaMatrix runtime types. |
Expression |
getExpression()
Return the expression defining the value of this parameter |
int |
getIndex()
Return the index of this parameter |
java.lang.Object |
getMetadataID()
Get actual metadataID for this parameter |
java.lang.String |
getName()
Get full parameter name, including procedure name. |
ElementSymbol |
getParameterSymbol()
Get element symbol representing this parameter. |
int |
getParameterType()
Get type of parameter according to class constants. |
ElementSymbol |
getResultSetColumn(int position)
Get a particular result set column at the specified position. |
java.util.List |
getResultSetColumns()
Get the result set columns. |
java.util.List |
getResultSetIDs()
Get the result set metadata IDs. |
java.lang.Object |
getValue()
This is a helper method to get the value of this parameter when the expression is a constant. |
int |
hashCode()
|
boolean |
isInternal()
Check whether the parameter is internal or not. |
boolean |
isUsingDefault()
|
void |
setClassType(java.lang.Class classType)
Set class type - MetaMatrix runtime types. |
void |
setExpression(Expression expression)
Set the expression defining this parameter |
void |
setIndex(int index)
Set the positional index of this parameter |
void |
setMetadataID(java.lang.Object metadataID)
Set actual metadataID for this parameter |
void |
setName(java.lang.String name)
Set full parameter name, including procedure name |
void |
setParameterType(int parameterType)
Set parameter type according to class constants. |
void |
setUsingDefault(boolean usingDefault)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int IN
public static final int OUT
public static final int INOUT
public static final int RETURN_VALUE
public static final int RESULT_SET
Constructor Detail |
---|
public SPParameter(int index, Expression expression)
index
- the positional index of this parametervalue
- the Value of this parameterpublic SPParameter(int index, int parameterType, java.lang.String name)
index
- Parameter indexparameterType
- Type of parameter based on class constant - IN, OUT, etcname
- Full name of parameter (including proc name)Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
name
- Parameter namepublic void setParameterType(int parameterType)
parameterType
- Type to setParameterInfo.IN
,
ParameterInfo.OUT
,
ParameterInfo.INOUT
,
ParameterInfo.RESULT_SET
,
ParameterInfo.RETURN_VALUE
public int getParameterType()
ParameterInfo.IN
,
ParameterInfo.OUT
,
ParameterInfo.INOUT
,
ParameterInfo.RESULT_SET
,
ParameterInfo.RETURN_VALUE
public void setClassType(java.lang.Class classType)
classType
- See DataTypeManager.DefaultDataClasses
for typespublic java.lang.Class getClassType()
public void setExpression(Expression expression)
expression
- The expression defining this parameter's valuepublic Expression getExpression()
public java.lang.Object getValue()
public void setIndex(int index)
index
- The positional index of this parameterpublic int getIndex()
public void addResultSetColumn(java.lang.String name, java.lang.Class type, java.lang.Object id)
name
- Name of columntype
- Type of columnpublic java.util.List getResultSetColumns()
public java.util.List getResultSetIDs()
public ElementSymbol getResultSetColumn(int position)
position
- Position of the result set column
java.lang.IllegalArgumentException
- If column doesn't existpublic java.lang.Object getMetadataID()
public void setMetadataID(java.lang.Object metadataID)
metadataID
- Actual metadataIDpublic boolean isInternal()
public ElementSymbol getParameterSymbol()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.Object clone()
clone
in class java.lang.Object
Object.clone()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean isUsingDefault()
public void setUsingDefault(boolean usingDefault)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |