public class SPParameter extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
SPParameter(int index,
Expression expression)
Constructor used when constructing a parameter during execution.
|
SPParameter(int index,
int parameterType,
String name)
Constructor used when constructing a parameter from metadata.
|
Modifier and Type | Method and Description |
---|---|
void |
addResultSetColumn(String colName,
Class<?> type,
Object id)
Add a result set column if this parameter is a return
result set.
|
Object |
clone() |
boolean |
equals(Object obj)
Checks whether another parameter equals this one based on the index.
|
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
|
Object |
getMetadataID()
Get actual metadataID for this parameter
|
String |
getName()
Get full parameter 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.
|
List<ElementSymbol> |
getResultSetColumns()
Get the result set columns.
|
List<Object> |
getResultSetIDs()
Get the result set metadata IDs.
|
int |
hashCode() |
boolean |
isUsingDefault() |
boolean |
isVarArg() |
void |
setClassType(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(Object metadataID)
Set actual metadataID for this parameter
|
void |
setName(String name)
Set full parameter name
|
void |
setParameterType(int parameterType)
Set parameter type according to class constants.
|
void |
setUsingDefault(boolean usingDefault) |
void |
setVarArg(boolean varArg) |
String |
toString() |
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
public SPParameter(int index, Expression expression)
index
- the positional index of this parametervalue
- the Value of this parameterpublic SPParameter(int index, int parameterType, String name)
index
- Parameter indexparameterType
- Type of parameter based on class constant - IN, OUT, etcname
- Full name of parameter (including proc name)public String getName()
public void setName(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(Class<?> classType)
classType
- See DataTypeManager.DefaultDataClasses
for typespublic Class<?> getClassType()
public void setExpression(Expression expression)
expression
- The expression defining this parameter's valuepublic Expression getExpression()
public void setIndex(int index)
index
- The positional index of this parameterpublic int getIndex()
public void addResultSetColumn(String colName, Class<?> type, Object id)
colName
- Name of columntype
- Type of columnpublic List<ElementSymbol> getResultSetColumns()
public List<Object> getResultSetIDs()
public ElementSymbol getResultSetColumn(int position)
position
- Position of the result set columnIllegalArgumentException
- If column doesn't existpublic Object getMetadataID()
public void setMetadataID(Object metadataID)
metadataID
- Actual metadataIDpublic ElementSymbol getParameterSymbol()
public boolean equals(Object obj)
equals
in class Object
Object.equals(Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public Object clone()
clone
in class Object
Object.clone()
public String toString()
toString
in class Object
Object.toString()
public boolean isUsingDefault()
public void setUsingDefault(boolean usingDefault)
public void setVarArg(boolean varArg)
public boolean isVarArg()
Copyright © 2019. All rights reserved.