|
|||||||||
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.JavaValueNode
abstract class JavaValueNode
This abstract node class represents a data value in the Java domain.
Field Summary | |
---|---|
private int |
collationType
|
protected boolean |
forCallStatement
|
protected JSQLType |
jsqlType
|
private boolean |
mustCastToPrimitive
|
private LocalField |
receiverField
|
private boolean |
returnValueDiscarded
|
private boolean |
valueReturnedToSQLDomain
|
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
---|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
Constructor Summary | |
---|---|
JavaValueNode()
|
Method Summary | |
---|---|
(package private) abstract JavaValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.Vector aggregateVector)
|
void |
castToPrimitive(boolean booleanValue)
Toggles whether the code generator should add a cast to extract a primitive value from an object. |
abstract boolean |
categorize(JBitSet referencedTabs,
boolean simplePredsOnly)
|
void |
checkReliability(ValueNode sqlNode)
Check the reliability type of this java value. |
protected void |
generate(ActivationClassBuilder acb,
MethodBuilder mb)
Do the code generation for this node. |
protected abstract void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
General logic shared by Core compilation and by the Replication Filter compiler. |
protected boolean |
generateReceiver(ExpressionClassBuilder acb,
MethodBuilder mb)
Generate the expression that evaluates to the receiver. |
protected boolean |
generateReceiver(ExpressionClassBuilder acb,
MethodBuilder mb,
JavaValueNode receiver)
Generate the expression that evaluates to the receiver. |
int |
getCollationType()
|
(package private) java.lang.Object |
getConstantValueAsObject()
|
DataTypeDescriptor |
getDataType()
Get the resolved data type of this node. |
java.lang.String |
getJavaTypeName()
|
JSQLType |
getJSQLType()
Get the JSQLType that corresponds to this node. |
protected int |
getOrderableVariantType()
Return the variant type for the underlying expression. |
java.lang.String |
getPrimitiveTypeName()
|
protected void |
getReceiverExpression(ExpressionClassBuilder acb,
MethodBuilder mb,
JavaValueNode receiver)
Get an expression that has the value of the receiver. |
boolean |
isPrimitiveType()
|
TypeId |
mapToTypeID(JSQLType jsqlType)
Map a JSQLType to a compilation type id. |
void |
markForCallStatement()
Mark this node as being for a CALL Statement. |
protected void |
markReturnValueDiscarded()
Tell this node that nothing is done with the returned value |
boolean |
mustCastToPrimitive()
Reports whether the code generator should add a cast to extract a primitive value from an object. |
abstract void |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
|
abstract JavaValueNode |
remapColumnReferencesToExpressions()
|
protected boolean |
returnValueDiscarded()
Tell whether the return value from this node is discarded |
protected void |
returnValueToSQLDomain()
Inform this node that it returns its value to the SQL domain |
void |
setCollationType(int type)
Set the collation type. |
void |
setJavaTypeName(java.lang.String javaTypeName)
|
protected boolean |
valueReturnedToSQLDomain()
Tell whether this node returns its value to the SQL domain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private boolean mustCastToPrimitive
protected boolean forCallStatement
private boolean valueReturnedToSQLDomain
private boolean returnValueDiscarded
protected JSQLType jsqlType
private LocalField receiverField
private int collationType
Constructor Detail |
---|
JavaValueNode()
Method Detail |
---|
public DataTypeDescriptor getDataType() throws StandardException
StandardException
public boolean isPrimitiveType() throws StandardException
StandardException
public java.lang.String getJavaTypeName() throws StandardException
StandardException
public void setJavaTypeName(java.lang.String javaTypeName)
public java.lang.String getPrimitiveTypeName() throws StandardException
StandardException
public void castToPrimitive(boolean booleanValue)
booleanValue
- true if we want the code generator to add a cast
false otherwisepublic boolean mustCastToPrimitive()
public JSQLType getJSQLType() throws StandardException
StandardException
public TypeId mapToTypeID(JSQLType jsqlType) throws StandardException
jsqlType
- the universal type to map
StandardException
public void markForCallStatement()
public abstract JavaValueNode remapColumnReferencesToExpressions() throws StandardException
StandardException
- Thrown on errorValueNode.remapColumnReferencesToExpressions()
public abstract boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException
StandardException
- Thrown on errorValueNode.categorize(org.apache.derby.iapi.util.JBitSet, boolean)
abstract JavaValueNode bindExpression(FromList fromList, SubqueryList subqueryList, java.util.Vector aggregateVector) throws StandardException
StandardException
- Thrown on errorValueNode.bindExpression(org.apache.derby.impl.sql.compile.FromList, org.apache.derby.impl.sql.compile.SubqueryList, java.util.Vector)
public abstract void preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
StandardException
- Thrown on errorValueNode.preprocess(int, org.apache.derby.impl.sql.compile.FromList, org.apache.derby.impl.sql.compile.SubqueryList, org.apache.derby.impl.sql.compile.PredicateList)
java.lang.Object getConstantValueAsObject() throws StandardException
StandardException
- Thrown on errorValueNode.getConstantValueAsObject()
protected final void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException
generate
in class QueryTreeNode
acb
- The ActivationClassBuilder for the class being builtmb
- the method the expression will go into
StandardException
- Thrown on errorprotected boolean generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class being builtmb
- the method the expression will go into
StandardException
- Thrown on errorprotected int getOrderableVariantType() throws StandardException
StandardException
protected abstract void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class being builtmb
- the method the expression will go into
StandardException
- Thrown on errorprotected final boolean generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) throws StandardException
acb
- The ActivationClassBuilder for the class being builtmb
- the method the expression will go intoreceiver
- The query tree form of the receiver expression
StandardException
- Thrown on errorprotected final void getReceiverExpression(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) throws StandardException
acb
- The ExpressionClassBuilder for the class we're generatingmb
- the method the expression will go intoreceiver
- The query tree form of the receiver expression
StandardException
- Thrown on errorprotected void returnValueToSQLDomain()
protected boolean valueReturnedToSQLDomain()
protected void markReturnValueDiscarded()
protected boolean returnValueDiscarded()
public void checkReliability(ValueNode sqlNode) throws StandardException
StandardException
- Thrown on errorCompilerContext
public int getCollationType()
public void setCollationType(int type)
type
- one of StringDataValue.COLLATION_TYPE_UCS_BASIC
or
StringDataValue.COLLATION_TYPE_TERRITORY_BASED
|
Built on Thu 2012-03-29 21:53:33+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |