|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.ValueNode
org.apache.derby.impl.sql.compile.ParameterNode
This node type represents a ? parameter.
| Field Summary | |
(package private) DataValueDescriptor |
defaultValue
|
private boolean |
generated
|
protected JSQLType |
jsqlType
This ParameterNode may turn up as an argument to a replicated Work Unit. |
private int |
orderableVariantType
|
(package private) int |
parameterNumber
|
private ValueNode |
returnOutputParameter
By default, we assume we are just a normal, harmless little ole parameter. |
(package private) DataTypeDescriptor[] |
typeServices
|
| Fields inherited from class org.apache.derby.impl.sql.compile.ValueNode |
clause, dataTypeServices, IN_HAVING_CLAUSE, IN_SELECT_LIST, IN_UNKNOWN_CLAUSE, IN_WHERE_CLAUSE, transformed |
| Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset |
| Constructor Summary | |
ParameterNode()
Constructor for use by the NodeFactory |
|
| Method Summary | |
ValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.Vector aggregateVector)
Bind this expression. |
boolean |
constantExpression(PredicateList whereClause)
Return whether or not this expression tree represents a constant value. |
void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
For a ParameterNode, we generate a call to the type factory to get a DataValueDescriptor, and pass the result to the setStorableDataValue method of the ParameterValueSet for the generated class. |
(package private) void |
generateHolder(ExpressionClassBuilder acb)
|
static void |
generateParameterHolders(ExpressionClassBuilder acb,
java.util.Vector parameterList)
|
static void |
generateParameterValueSet(ExpressionClassBuilder acb,
int numberOfParameters,
java.util.Vector parameterList)
Generate the code to create the ParameterValueSet, if necessary, when constructing the activation. |
(package private) DataValueDescriptor |
getDefaultValue()
Get the default value for the parameter. |
JSQLType |
getJSQLType()
Get the JSQLType associated with this parameter. |
protected int |
getOrderableVariantType()
Return the variant type for the underlying expression. |
int |
getParameterNumber()
Get the parameter number |
TypeId |
getTypeId()
Get the TypeId from this ValueNode. |
void |
init(java.lang.Object parameterNumber,
java.lang.Object defaultValue)
Initializer for a ParameterNode. |
boolean |
isConstantExpression()
Return whether or not this expression tree represents a constant expression. |
boolean |
isParameterNode()
Returns TRUE if this is a parameter node. |
boolean |
isReturnOutputParam()
Is this as a return output parameter (e.g. ? |
void |
setDescriptor(DataTypeDescriptor descriptor)
Set the DataTypeServices for this parameter |
void |
setDescriptors(DataTypeDescriptor[] descriptors)
Set the descriptor array |
void |
setJSQLType(JSQLType type)
Set the JSQLType of this parameter. |
(package private) void |
setOrderableVariantType(int type)
In a special circumstance, we want to consider parameters as constants. |
void |
setReturnOutputParam(ValueNode valueNode)
Mark this as a return output parameter (e.g. ? |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
int parameterNumber
private boolean generated
DataTypeDescriptor[] typeServices
DataValueDescriptor defaultValue
protected JSQLType jsqlType
private int orderableVariantType
private ValueNode returnOutputParameter
| Constructor Detail |
public ParameterNode()
| Method Detail |
public void init(java.lang.Object parameterNumber,
java.lang.Object defaultValue)
init in class QueryTreeNodeparameterNumber - The number of this parameter,
(unique per query starting at 0)defaultValue - The default value for this parameterpublic int getParameterNumber()
public void setDescriptors(DataTypeDescriptor[] descriptors)
public void setDescriptor(DataTypeDescriptor descriptor)
setDescriptor in class ValueNodedescriptor - The DataTypeServices to set for this parameter
public void setReturnOutputParam(ValueNode valueNode)
public boolean isReturnOutputParam()
public ValueNode bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.Vector aggregateVector)
throws StandardException
bindExpression in class ValueNodefromList - The FROM list for the query this
expression is in, for binding columns.subqueryList - The subquery list being built as we find SubqueryNodesaggregateVector - The aggregate vector being built as we find AggregateNodes
StandardException - Thrown on errorpublic boolean isConstantExpression()
isConstantExpression in class ValueNodepublic boolean constantExpression(PredicateList whereClause)
ValueNode
constantExpression in class ValueNodeValueNode.constantExpression(org.apache.derby.impl.sql.compile.PredicateList)protected int getOrderableVariantType()
getOrderableVariantType in class ValueNodevoid setOrderableVariantType(int type)
public void setJSQLType(JSQLType type)
type - the JSQLType associated with this parameterpublic JSQLType getJSQLType()
public void generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
throws StandardException
generateExpression in class ValueNodeacb - The ExpressionClassBuilder for the class being builtmb - The method the expression will go into
StandardException - Thrown on error
void generateHolder(ExpressionClassBuilder acb)
throws StandardException
StandardExceptionpublic TypeId getTypeId()
ValueNode
getTypeId in class ValueNode
public static void generateParameterValueSet(ExpressionClassBuilder acb,
int numberOfParameters,
java.util.Vector parameterList)
throws StandardException
acb - The ExpressionClassBuilder for the class we're buildingnumberOfParameters - number of parameters for this statementparameterList - The parameter list for the statement.
StandardException - on error
public static void generateParameterHolders(ExpressionClassBuilder acb,
java.util.Vector parameterList)
throws StandardException
StandardExceptionDataValueDescriptor getDefaultValue()
public boolean isParameterNode()
ValueNode
isParameterNode in class ValueNodeValueNode.isParameterNode()
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||