| java.lang.Object org.apache.derby.impl.sql.compile.QueryTreeNode org.apache.derby.impl.sql.compile.JavaValueNode
All known Subclasses: org.apache.derby.impl.sql.compile.SQLToJavaValueNode, org.apache.derby.impl.sql.compile.MethodCallNode, org.apache.derby.impl.sql.compile.StaticClassFieldReferenceNode, org.apache.derby.impl.sql.compile.GetCurrentConnectionNode,
JavaValueNode | abstract class JavaValueNode extends QueryTreeNode (Code) | | This abstract node class represents a data value in the Java domain.
|
Method Summary | |
abstract JavaValueNode | bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) | public void | castToPrimitive(boolean booleanValue) Toggles whether the code generator should add a cast to extract a primitive
value from an object. | abstract public boolean | categorize(JBitSet referencedTabs, boolean simplePredsOnly) | public void | checkReliability(ValueNode sqlNode) Check the reliability type of this java value. | final protected void | generate(ActivationClassBuilder acb, MethodBuilder mb) Do the code generation for this node. | abstract protected 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. | final protected boolean | generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) Generate the expression that evaluates to the receiver. | Object | getConstantValueAsObject() | public JSQLType | getJSQLType() Get the JSQLType that corresponds to this node. | public String | getJavaTypeName() | protected int | getOrderableVariantType() Return the variant type for the underlying expression. | public String | getPrimitiveTypeName() | final protected void | getReceiverExpression(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) Get an expression that has the value of the receiver. | public boolean | isPrimitiveType() | public TypeId | mapToTypeID(JSQLType jsqlType) Map a JSQLType to a compilation type id. | public void | markForCallStatement() Mark this node as being for a CALL Statement. | protected void | markReturnValueDiscarded() | public boolean | mustCastToPrimitive() Reports whether the code generator should add a cast to extract a primitive
value from an object. | abstract public void | preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) | abstract public JavaValueNode | remapColumnReferencesToExpressions() | protected boolean | returnValueDiscarded() | protected void | returnValueToSQLDomain() | public void | setClause(int clause) Set the clause that this node appears in. | public void | setJavaTypeName(String javaTypeName) | protected boolean | valueReturnedToSQLDomain() |
forCallStatement | protected boolean forCallStatement(Code) | | |
castToPrimitive | public void castToPrimitive(boolean booleanValue)(Code) | | Toggles whether the code generator should add a cast to extract a primitive
value from an object.
Parameters: booleanValue - true if we want the code generator to add a castfalse otherwise |
generate | final protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code) | | Do the code generation for this node. Call the more general
routine that generates expressions.
Parameters: acb - The ActivationClassBuilder for the class being built Parameters: mb - the method the expression will go into exception: StandardException - Thrown on error |
generateExpression | abstract protected void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code) | | General logic shared by Core compilation and by the Replication Filter
compiler. Every child of ValueNode must implement one of these methods.
Parameters: acb - The ExpressionClassBuilder for the class being built Parameters: mb - the method the expression will go into exception: StandardException - Thrown on error |
generateReceiver | protected boolean generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code) | | Generate the expression that evaluates to the receiver. This is
for the case where a java expression is being returned to the SQL
domain, and we need to check whether the receiver is null (if so,
the SQL value should be set to null, and this Java expression
not evaluated). Instance method calls and field references have
receivers, while class method calls and calls to constructors do
not. If this Java expression does not have a receiver, this method
returns null.
The implementation of this method should only generate the receiver
once and cache it in a field. This is because there will be two
references to the receiver, and we want to evaluate it only once.
Parameters: acb - The ExpressionClassBuilder for the class being built Parameters: mb - the method the expression will go into True if has compiled receiver. exception: StandardException - Thrown on error |
generateReceiver | final protected boolean generateReceiver(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) throws StandardException(Code) | | Generate the expression that evaluates to the receiver. This is
for the case where a java expression is being returned to the SQL
domain, and we need to check whether the receiver is null (if so,
the SQL value should be set to null, and this Java expression
not evaluated). Instance method calls and field references have
receivers, while class method calls and calls to constructors do
not. If this Java expression does not have a receiver, this method
returns null.
This also covers the case where a java expression is being returned
to the Java domain. In this case, we need to check whether the
receiver is null only if the value returned by the Java expression
is an object (not a primitive type). We don't want to generate the
expression here if we are returning a primitive type to the Java
domain, because there's no point in checking whether the receiver
is null in this case (we can't make the expression return a null
value).
Only generate the receiver once and cache it in a field. This is
because there will be two references to the receiver, and we want
to evaluate it only once.
Parameters: acb - The ActivationClassBuilder for the class being built Parameters: mb - the method the expression will go into Parameters: receiver - The query tree form of the receiver expression The compiled receiver, if any. exception: StandardException - Thrown on error |
getJSQLType | public JSQLType getJSQLType() throws StandardException(Code) | | Get the JSQLType that corresponds to this node. Could be a SQLTYPE,
a Java primitive, or a Java class.
the corresponding JSQLType |
getOrderableVariantType | protected int getOrderableVariantType() throws StandardException(Code) | | Return the variant type for the underlying expression.
The variant type can be:
VARIANT - variant within a scan
(method calls and non-static field access)
SCAN_INVARIANT - invariant within a scan
(column references from outer tables)
QUERY_INVARIANT - invariant within the life of a query
(constant expressions)
The variant type for the underlying expression. |
getReceiverExpression | final protected void getReceiverExpression(ExpressionClassBuilder acb, MethodBuilder mb, JavaValueNode receiver) throws StandardException(Code) | | Get an expression that has the value of the receiver. If a field
holding the receiver value was already generated, use that. If not,
generate the receiver value.
Parameters: acb - The ExpressionClassBuilder for the class we're generating Parameters: mb - the method the expression will go into Parameters: receiver - The query tree form of the receiver expression exception: StandardException - Thrown on error |
mapToTypeID | public TypeId mapToTypeID(JSQLType jsqlType)(Code) | | Map a JSQLType to a compilation type id.
Parameters: jsqlType - the universal type to map the corresponding compilation type id |
markForCallStatement | public void markForCallStatement()(Code) | | Mark this node as being for a CALL Statement.
(void methods are only okay for CALL Statements)
|
markReturnValueDiscarded | protected void markReturnValueDiscarded()(Code) | | Tell this node that nothing is done with the returned value
|
mustCastToPrimitive | public boolean mustCastToPrimitive()(Code) | | Reports whether the code generator should add a cast to extract a primitive
value from an object.
true if we want the code generator to add a castfalse otherwise |
returnValueDiscarded | protected boolean returnValueDiscarded()(Code) | | Tell whether the return value from this node is discarded
|
returnValueToSQLDomain | protected void returnValueToSQLDomain()(Code) | | Inform this node that it returns its value to the SQL domain
|
setClause | public void setClause(int clause)(Code) | | Set the clause that this node appears in.
Parameters: clause - The clause that this node appears in. |
setJavaTypeName | public void setJavaTypeName(String javaTypeName)(Code) | | |
valueReturnedToSQLDomain | protected boolean valueReturnedToSQLDomain()(Code) | | Tell whether this node returns its value to the SQL domain
|
Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNode | public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) public QueryTreeNode bind() throws StandardException(Code)(Java Doc) public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)(Java Doc) protected static void debugFlush()(Code)(Java Doc) public static void debugPrint(String outputString)(Code)(Java Doc) public void disablePrivilegeCollection()(Code)(Java Doc) public String executeSchemaName()(Code)(Java Doc) public String executeStatementName()(Code)(Java Doc) public static String formatNodeString(String nodeString, int depth)(Code)(Java Doc) public boolean foundString(String[] list, String search)(Code)(Java Doc) public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)(Java Doc) protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)(Java Doc) public int getBeginOffset()(Code)(Java Doc) final protected ClassFactory getClassFactory()(Code)(Java Doc) final protected CompilerContext getCompilerContext()(Code)(Java Doc) final public ContextManager getContextManager()(Code)(Java Doc) public Object getCursorInfo() throws StandardException(Code)(Java Doc) final public DataDictionary getDataDictionary()(Code)(Java Doc) final public DependencyManager getDependencyManager()(Code)(Java Doc) public int getEndOffset()(Code)(Java Doc) final public ExecutionFactory getExecutionFactory()(Code)(Java Doc) final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)(Java Doc) protected int getIntProperty(String value, String key) throws StandardException(Code)(Java Doc) final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc) final public NodeFactory getNodeFactory()(Code)(Java Doc) protected int getNodeType()(Code)(Java Doc) public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)(Java Doc) public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)(Java Doc) public long getRowEstimate()(Code)(Java Doc) public String getSPSName()(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)(Java Doc) protected int getStatementType()(Code)(Java Doc) final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)(Java Doc) final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)(Java Doc) public void init(Object arg1) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) throws StandardException(Code)(Java Doc) public boolean isAtomic() throws StandardException(Code)(Java Doc) protected boolean isInstanceOf(int nodeType)(Code)(Java Doc) public boolean isPrivilegeCollectionRequired()(Code)(Java Doc) final boolean isSessionSchema(SchemaDescriptor sd)(Code)(Java Doc) final boolean isSessionSchema(String schemaName)(Code)(Java Doc) public ConstantAction makeConstantAction() throws StandardException(Code)(Java Doc) public ResultDescription makeResultDescription() throws StandardException(Code)(Java Doc) public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)(Java Doc) public boolean needsSavepoint()(Code)(Java Doc) protected String nodeHeader()(Code)(Java Doc) public QueryTreeNode optimize() throws StandardException(Code)(Java Doc) public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)(Java Doc) public void printLabel(int depth, String label)(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc) public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)(Java Doc) public void setBeginOffset(int beginOffset)(Code)(Java Doc) public void setContextManager(ContextManager cm)(Code)(Java Doc) public void setEndOffset(int endOffset)(Code)(Java Doc) public void setNodeType(int nodeType)(Code)(Java Doc) public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void treePrint()(Code)(Java Doc) public void treePrint(int depth)(Code)(Java Doc) String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(Code)(Java Doc)
|
|
|