Java Doc for QueryTreeNode.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » sql » compile » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.impl.sql.compile 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.sql.compile.QueryTreeNode

All known Subclasses:   org.apache.derby.impl.sql.compile.StatementNode,  org.apache.derby.impl.sql.compile.TableName,  org.apache.derby.impl.sql.compile.OrderedColumn,  org.apache.derby.impl.sql.compile.Predicate,  org.apache.derby.impl.sql.compile.HashNodeList,  org.apache.derby.impl.sql.compile.JavaValueNode,  org.apache.derby.impl.sql.compile.QueryTreeNodeVector,  org.apache.derby.impl.sql.compile.TableElementNode,  org.apache.derby.impl.sql.compile.ResultSetNode,  org.apache.derby.impl.sql.compile.ValueNode,  org.apache.derby.impl.sql.compile.TablePrivilegesNode,  org.apache.derby.impl.sql.compile.PrivilegeNode,
QueryTreeNode
abstract public class QueryTreeNode implements Visitable(Code)
QueryTreeNode is the root class for all query tree nodes. All query tree nodes inherit from QueryTreeNode except for those that extend QueryTreeNodeVector.
author:
   Jeff Lichtman


Field Summary
final public static  intAUTOINCREMENT_CREATE_MODIFY
    
final public static  intAUTOINCREMENT_INC_INDEX
    
final public static  intAUTOINCREMENT_IS_AUTOINCREMENT_INDEX
    
final public static  intAUTOINCREMENT_START_INDEX
    
 booleanisPrivilegeCollectionRequired
     In Derby SQL Standard Authorization, views, triggers and constraints execute with definer's privileges.


Method Summary
public  Visitableaccept(Visitor v)
     Accept a visitor, and call v.visit() on child nodes as necessary.
public  QueryTreeNodebind()
     Perform the binding operation on a query tree.
public  DataValueDescriptorconvertDefaultNode(DataTypeDescriptor typeDescriptor)
     Translate a Default node into a default value, given a type descriptor.
protected static  voiddebugFlush()
    
public static  voiddebugPrint(String outputString)
    
public  voiddisablePrivilegeCollection()
     Triggers, constraints and views get executed with their definer's privileges and they can exist in the system only if their definers' still have all the privileges to creeate them.
public  StringexecuteSchemaName()
     Returns name of schema in EXECUTE STATEMENT command.
public  StringexecuteStatementName()
     Returns the name of statement in EXECUTE STATEMENT command. Returns null for all other commands.
public static  StringformatNodeString(String nodeString, int depth)
     Format a node that has been converted to a String for printing as part of a tree.
public  booleanfoundString(String[] list, String search)
    
public  GeneratedClassgenerate(ByteArray ignored)
     this implementation of generate() is a place-holder until all of the nodes that need to, implement it.
protected  voidgenerate(ActivationClassBuilder acb, MethodBuilder mb)
     Do the code generation for this node.
 voidgenerateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)
     Add an authorization check into the passed in method.
public  intgetBeginOffset()
     Gets the beginning offset of the SQL substring which this query node represents. The beginning offset of the SQL substring.
final protected  ClassFactorygetClassFactory()
     Get the ClassFactory to use with this database.
final protected  CompilerContextgetCompilerContext()
    
final public  ContextManagergetContextManager()
     Get the current ContextManager.
public  ObjectgetCursorInfo()
    
final public  DataDictionarygetDataDictionary()
    
final public  DependencyManagergetDependencyManager()
    
public  intgetEndOffset()
     Gets the ending offset of the SQL substring which this query node represents. The ending offset of the SQL substring.
final public  ExecutionFactorygetExecutionFactory()
    
final public  GenericConstantActionFactorygetGenericConstantActionFactory()
     Gets the constant action factory for this database.
protected  intgetIntProperty(String value, String key)
    
final protected  LanguageConnectionContextgetLanguageConnectionContext()
     Gets the LanguageConnectionContext for this connection.
final public  NodeFactorygetNodeFactory()
     Gets the NodeFactory for this database.
protected  intgetNodeType()
    
public  ConstantNodegetNullNode(TypeId typeId, ContextManager cm)
    
public  DataTypeDescriptor[]getParameterTypes()
     Parameter info is stored in the compiler context.
public  longgetRowEstimate()
     Get the optimizer's estimate of the number of rows returned or affected for an optimized QueryTree. For non-optimizable statements (for example, CREATE TABLE), return 0.
public  StringgetSPSName()
     Get the name of the SPS that is used to execute this statement.
final  SchemaDescriptorgetSchemaDescriptor(String schemaName)
     Get the descriptor for the named schema.
final  SchemaDescriptorgetSchemaDescriptor(String schemaName, boolean raiseError)
    
protected  intgetStatementType()
     Return the type of statement, something from StatementType.
final protected  TableDescriptorgetTableDescriptor(String tableName, SchemaDescriptor schema)
     Get the descriptor for the named table within the given schema. If the schema parameter is NULL, it looks for the table in the current (default) schema.
final protected  TypeCompilergetTypeCompiler(TypeId typeId)
    
public  voidinit(Object arg1)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3, Object arg4)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11)
     Initialize a query tree node.
public  voidinit(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12)
     Initialize a query tree node.
public  voidinit(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)
     Initialize a query tree node.
public  voidinit(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)
     Initialize a query tree node.
public  booleanisAtomic()
    
protected  booleanisInstanceOf(int nodeType)
     For final nodes, return whether or not the node represents the specified nodeType.
Parameters:
  nodeType - The nodeType of interest.
public  booleanisPrivilegeCollectionRequired()
     Return true from this method means that we need to collect privilege requirement for this node.
final  booleanisSessionSchema(SchemaDescriptor sd)
    
final  booleanisSessionSchema(String schemaName)
    
public  ConstantActionmakeConstantAction()
     This creates a class that will do the work that's constant across all Executions of a PreparedStatement.
public  ResultDescriptionmakeResultDescription()
     Only DML statements have result descriptions - for all others return null.
public  TableNamemakeTableName(String schemaName, String flatName)
    
public  booleanneedsSavepoint()
     Returns whether or not this Statement requires a set/clear savepoint around its execution.
protected  StringnodeHeader()
     Return header information for debug printing of this query tree node.
public  QueryTreeNodeoptimize()
     Generates an optimized QueryTree from a bound QueryTree.
public static  QueryTreeNodeparseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc)
     Parse some query text and return a parse tree.
public  voidprintLabel(int depth, String label)
     Print the given label at the given indentation depth.
public  voidprintSubNodes(int depth)
     Print the sub-nodes of this node. Each sub-class of QueryTreeNode is expected to provide its own printSubNodes() method.
public  booleanreferencesSessionSchema()
    
public  TableNameresolveTableToSynonym(TableName tabName)
     Resolve table/view reference to a synonym.
public  voidsetBeginOffset(int beginOffset)
     Sets the beginning offset of the SQL substring which this query node represents.
public  voidsetContextManager(ContextManager cm)
     Set the ContextManager for this node.
public  voidsetEndOffset(int endOffset)
     Sets the ending offset of the SQL substring which this query node represents.
public  voidsetNodeType(int nodeType)
     Set the node type for this node.
public  voidsetRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)
     set the Information gathered from the parent table that is required to peform a referential action on dependent table.
public  StringtoString()
     Format this node as a string Each sub-class of QueryTreeNode should implement its own toString() method.
public  voidtreePrint()
     Print this tree for debugging purposes.
public  voidtreePrint(int depth)
     Print this tree for debugging purposes.
 StringverifyClassExist(String javaClassName, boolean convertCase)
    

Field Detail
AUTOINCREMENT_CREATE_MODIFY
final public static int AUTOINCREMENT_CREATE_MODIFY(Code)



AUTOINCREMENT_INC_INDEX
final public static int AUTOINCREMENT_INC_INDEX(Code)



AUTOINCREMENT_IS_AUTOINCREMENT_INDEX
final public static int AUTOINCREMENT_IS_AUTOINCREMENT_INDEX(Code)



AUTOINCREMENT_START_INDEX
final public static int AUTOINCREMENT_START_INDEX(Code)



isPrivilegeCollectionRequired
boolean isPrivilegeCollectionRequired(Code)
In Derby SQL Standard Authorization, views, triggers and constraints execute with definer's privileges. Taking a specific eg of views user1 create table t1 (c11 int); create view v1 as select * from user1.t1; grant select on v1 to user2; user2 select * from user1.v1; Running with definer's privileges mean that since user2 has select privileges on view v1 owned by user1, then that is sufficient for user2 to do a select from view v1. View v1 underneath might access some objects that user2 doesn't have privileges on, but that is not a problem since views execute with definer's privileges. In order to implement this behavior, when doing a select from view v1, we only want to check for select privilege on view v1. While processing the underlying query for view v1, we want to stop collecting the privilege requirements for the query underneath. Following flag, isPrivilegeCollectionRequired is used for this purpose. The flag will be true when we are the top level of view and then it is turned off while we process the query underlying the view v1.





Method Detail
accept
public Visitable accept(Visitor v) throws StandardException(Code)
Accept a visitor, and call v.visit() on child nodes as necessary.
Parameters:
  v - the visitor
exception:
  StandardException - on error



bind
public QueryTreeNode bind() throws StandardException(Code)
Perform the binding operation on a query tree. Binding consists of permissions checking, view resolution, datatype resolution, and creation of a dependency list (for determining whether a tree or plan is still up to date). This bind() method does nothing. Each node type that can appear at the top of a tree can override this method with its own bind() method that does "something". The bound query tree
exception:
  StandardException - Thrown on error



convertDefaultNode
public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)
Translate a Default node into a default value, given a type descriptor.
Parameters:
  typeDescriptor - A description of the required data type.
exception:
  StandardException - Thrown on error



debugFlush
protected static void debugFlush()(Code)
Flush the debug stream out



debugPrint
public static void debugPrint(String outputString)(Code)
Print a String for debugging
Parameters:
  outputString - The String to print



disablePrivilegeCollection
public void disablePrivilegeCollection()(Code)
Triggers, constraints and views get executed with their definer's privileges and they can exist in the system only if their definers' still have all the privileges to creeate them. Based on this, any time a trigger/view/constraint is executing, we do not need to waste time in checking if the definer still has the right set of privileges. At compile time, we wil make sure that we do not collect the privilege requirement for objects accessed with definer privileges by calling the following method.



executeSchemaName
public String executeSchemaName()(Code)
Returns name of schema in EXECUTE STATEMENT command. Returns null for all other commands. String schema for EXECUTE STATEMENT null for all others



executeStatementName
public String executeStatementName()(Code)
Returns the name of statement in EXECUTE STATEMENT command. Returns null for all other commands. String null unless overridden for Execute Statement command



formatNodeString
public static String formatNodeString(String nodeString, int depth)(Code)
Format a node that has been converted to a String for printing as part of a tree. This method indents the String to the given depth by inserting tabs at the beginning of the string, and also after every newline.
Parameters:
  nodeString - The node formatted as a String
Parameters:
  depth - The depth to indent the given node The node String reformatted with tab indentation



foundString
public boolean foundString(String[] list, String search)(Code)



generate
public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)
this implementation of generate() is a place-holder until all of the nodes that need to, implement it. Only the root, statement nodes implement this flavor of generate; the other nodes will implement the version that returns Generators and takes an activation class builder as an argument.
Parameters:
  ignored - - ignored (he he) A GeneratedClass for this statement
exception:
  StandardException - Thrown on error



generate
protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)
Do the code generation for this node. This is a place-holder method - it should be over-ridden in the sub-classes.
Parameters:
  acb - The ActivationClassBuilder for the class being built
Parameters:
  mb - The method for the generated code to go into
exception:
  StandardException - Thrown on error



generateAuthorizeCheck
void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)
Add an authorization check into the passed in method.



getBeginOffset
public int getBeginOffset()(Code)
Gets the beginning offset of the SQL substring which this query node represents. The beginning offset of the SQL substring. -1 means unknown.



getClassFactory
final protected ClassFactory getClassFactory()(Code)
Get the ClassFactory to use with this database.



getCompilerContext
final protected CompilerContext getCompilerContext()(Code)
Get the CompilerContext The CompilerContext



getContextManager
final public ContextManager getContextManager()(Code)
Get the current ContextManager. The current ContextManager.



getCursorInfo
public Object getCursorInfo() throws StandardException(Code)



getDataDictionary
final public DataDictionary getDataDictionary()(Code)
Get the DataDictionary The DataDictionary



getDependencyManager
final public DependencyManager getDependencyManager()(Code)



getEndOffset
public int getEndOffset()(Code)
Gets the ending offset of the SQL substring which this query node represents. The ending offset of the SQL substring. -1 means unknown.



getExecutionFactory
final public ExecutionFactory getExecutionFactory()(Code)



getGenericConstantActionFactory
final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)
Gets the constant action factory for this database. the constant action factory.



getIntProperty
protected int getIntProperty(String value, String key) throws StandardException(Code)
Get the int value of a Property
Parameters:
  value - Property value as a String
Parameters:
  key - Key value of property The int value of the property
exception:
  StandardException - Thrown on failure



getLanguageConnectionContext
final protected LanguageConnectionContext getLanguageConnectionContext()(Code)
Gets the LanguageConnectionContext for this connection. the lcc for this connection



getNodeFactory
final public NodeFactory getNodeFactory()(Code)
Gets the NodeFactory for this database. the node factory for this database.



getNodeType
protected int getNodeType()(Code)



getNullNode
public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)
Get a ConstantNode to represent a typed null value
Parameters:
  typeId - The TypeId of the datatype of the null value
Parameters:
  cm - The ContextManager A ConstantNode with the specified type, and a value of null
exception:
  StandardException - Thrown on error



getParameterTypes
public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)
Parameter info is stored in the compiler context. Hide this from the callers. null
exception:
  StandardException - on error



getRowEstimate
public long getRowEstimate()(Code)
Get the optimizer's estimate of the number of rows returned or affected for an optimized QueryTree. For non-optimizable statements (for example, CREATE TABLE), return 0. For optimizable statements, this method will be over-ridden in the statement's root node (DMLStatementNode in all cases we know about so far). 0L



getSPSName
public String getSPSName()(Code)
Get the name of the SPS that is used to execute this statement. Only relevant for an ExecSPSNode -- otherwise, returns null. the name of the underlying sps



getSchemaDescriptor
final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)
Get the descriptor for the named schema. If the schemaName parameter is NULL, it gets the descriptor for the current (default) schema. Schema descriptors include authorization ids and schema ids. SQL92 allows a schema to specify a default character set - we will not support this. Will check default schema for a match before scanning a system table.
Parameters:
  schemaName - The name of the schema we're interested in.If the name is NULL, get the descriptor for thecurrent schema. The descriptor for the schema.
exception:
  StandardException - Thrown on error



getSchemaDescriptor
final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)



getStatementType
protected int getStatementType()(Code)
Return the type of statement, something from StatementType. the type of statement



getTableDescriptor
final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)
Get the descriptor for the named table within the given schema. If the schema parameter is NULL, it looks for the table in the current (default) schema. Table descriptors include object ids, object types (table, view, etc.) If the schema is SESSION, then before looking into the data dictionary for persistent tables, it first looks into LCC for temporary tables. If no temporary table tableName found for the SESSION schema, then it goes and looks through the data dictionary for persistent table We added getTableDescriptor here so that we can look for non data dictionary tables(ie temp tables) here. Any calls to getTableDescriptor in data dictionary should be only for persistent tables
Parameters:
  tableName - The name of the table to get the descriptor for
Parameters:
  schema - The descriptor for the schema the table lives in.If null, use the current (default) schema. The descriptor for the table, null if table does notexist.
exception:
  StandardException - Thrown on failure



getTypeCompiler
final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)
Get the TypeCompiler associated with the given TypeId
Parameters:
  typeId - The TypeId to get a TypeCompiler for The corresponding TypeCompiler



init
public void init(Object arg1) throws StandardException(Code)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
public void init(Object arg1, Object arg2) throws StandardException(Code)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
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)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
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)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
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)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
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)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



init
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)
Initialize a query tree node.
exception:
  StandardException - Thrown on error



isAtomic
public boolean isAtomic() throws StandardException(Code)



isInstanceOf
protected boolean isInstanceOf(int nodeType)(Code)
For final nodes, return whether or not the node represents the specified nodeType.
Parameters:
  nodeType - The nodeType of interest. Whether or notthe node represents the specified nodeType.



isPrivilegeCollectionRequired
public boolean isPrivilegeCollectionRequired()(Code)
Return true from this method means that we need to collect privilege requirement for this node. For following cases, this method will return true. 1)execute view - collect privilege to access view but do not collect privilege requirements for objects accessed by actual view uqery 2)execute select - collect privilege requirements for objects accessed by select statement 3)create view - collect privileges for select statement : the select statement for create view falls under 2) category above. true if need to collect privilege requirement for this node



isSessionSchema
final boolean isSessionSchema(SchemaDescriptor sd)(Code)
Checks if the passed schema descriptor is for SESSION schema true if the passed schema descriptor is for SESSION schema
exception:
  StandardException - Thrown on error



isSessionSchema
final boolean isSessionSchema(String schemaName)(Code)
Checks if the passed schema name is for SESSION schema true if the passed schema name is for SESSION schema
exception:
  StandardException - Thrown on error



makeConstantAction
public ConstantAction makeConstantAction() throws StandardException(Code)
This creates a class that will do the work that's constant across all Executions of a PreparedStatement. It's up to our subclasses to override this method if they need to compile constant actions into PreparedStatements.
exception:
  StandardException - Thrown on failure



makeResultDescription
public ResultDescription makeResultDescription() throws StandardException(Code)
Only DML statements have result descriptions - for all others return null. This method is overridden in DMLStatementNode. null
exception:
  StandardException - never actually thrown here,but thrown by subclasses



makeTableName
public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)



needsSavepoint
public boolean needsSavepoint()(Code)
Returns whether or not this Statement requires a set/clear savepoint around its execution. The following statement "types" do not require them: Cursor - unnecessary and won't work in a read only environment Xact - savepoint will get blown away underneath us during commit/rollback

ONLY CALLABLE AFTER GENERATION boolean Whether or not this Statement requires a set/clear savepoint




nodeHeader
protected String nodeHeader()(Code)
Return header information for debug printing of this query tree node. Header information for debug printing of this querytree node.



optimize
public QueryTreeNode optimize() throws StandardException(Code)
Generates an optimized QueryTree from a bound QueryTree. Actually, it annotates the tree in place rather than generating a new tree, but this interface allows the root node of the optmized QueryTree to be different from the root node of the bound QueryTree. For non-optimizable statements (for example, CREATE TABLE), return the bound tree without doing anything. For optimizable statements, this method will be over-ridden in the statement's root node (DMLStatementNode in all cases we know about so far). Throws an exception if the tree is not bound, or if the binding is out of date. An optimized QueryTree
exception:
  StandardException - Thrown on error



parseQueryText
public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)
Parse some query text and return a parse tree.
Parameters:
  compilerContext - The CompilerContext to use
Parameters:
  queryText - Query text to parse.
Parameters:
  paramDefaults - array of parameter defaults used toinitialize parameter nodes, and ultimatelyfor the optimization of statements withparameters.
Parameters:
  lcc - Current LanguageConnectionContext ResultSetNode The parse tree.
exception:
  StandardException - Thrown on error



printLabel
public void printLabel(int depth, String label)(Code)
Print the given label at the given indentation depth.
Parameters:
  depth - The depth of indentation to use when printingthe label
Parameters:
  label - The String to print



printSubNodes
public void printSubNodes(int depth)(Code)
Print the sub-nodes of this node. Each sub-class of QueryTreeNode is expected to provide its own printSubNodes() method. In each case, it calls super.printSubNodes(), passing along its depth, to get the sub-nodes of the super-class. Then it prints its own sub-nodes by calling treePrint() on each of its members that is a type of QueryTreeNode. In each case where it calls treePrint(), it should pass "depth + 1" to indicate that the sub-node should be indented one more level when printing. Also, it should call printLabel() to print the name of each sub-node before calling treePrint() on the sub-node, so that the reader of the printed tree can tell what the sub-node is. This printSubNodes() exists in here merely to act as a backstop. In other words, the calls to printSubNodes() move up the type hierarchy, and in this node the calls stop. I would have liked to put the call to super.printSubNodes() in this super-class, but Java resolves "super" statically, so it wouldn't get to the right super-class.
Parameters:
  depth - The depth to indent the sub-nodes



referencesSessionSchema
public boolean referencesSessionSchema() throws StandardException(Code)
Return true if the node references SESSION schema tables (temporary or permanent) true if references SESSION schema tables, else false
exception:
  StandardException - Thrown on error



resolveTableToSynonym
public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)
Resolve table/view reference to a synonym. May have to follow a synonym chain.
Parameters:
  tabName - to match for a synonym Synonym TableName if a match is found, NULL otherwise.
exception:
  StandardException - Thrown on error



setBeginOffset
public void setBeginOffset(int beginOffset)(Code)
Sets the beginning offset of the SQL substring which this query node represents.
Parameters:
  beginOffset - The beginning offset of the SQL substring.



setContextManager
public void setContextManager(ContextManager cm)(Code)
Set the ContextManager for this node.
Parameters:
  cm - The ContextManager.



setEndOffset
public void setEndOffset(int endOffset)(Code)
Sets the ending offset of the SQL substring which this query node represents.
Parameters:
  endOffset - The ending offset of the SQL substring.



setNodeType
public void setNodeType(int nodeType)(Code)
Set the node type for this node.
Parameters:
  nodeType - The node type.



setRefActionInfo
public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)
set the Information gathered from the parent table that is required to peform a referential action on dependent table.



toString
public String toString()(Code)
Format this node as a string Each sub-class of QueryTreeNode should implement its own toString() method. In each case, toString() should format the class members that are not sub-types of QueryTreeNode (printSubNodes() takes care of following the references to sub-nodes, and toString() takes care of all members that are not sub-nodes). Newlines should be used liberally - one good way to do this is to have a newline at the end of each formatted member. It's also a good idea to put the name of each member in front of the formatted value. For example, the code might look like: "memberName: " + memberName + "\n" + ... This node formatted as a String



treePrint
public void treePrint()(Code)
Print this tree for debugging purposes. This recurses through all the sub-nodes and prints them indented by their depth in the tree.



treePrint
public void treePrint(int depth)(Code)
Print this tree for debugging purposes. This recurses through all the sub-nodes and prints them indented by their depth in the tree, starting with the given indentation.
Parameters:
  depth - The depth of this node in the tree, thus,the amount to indent it when printing it.



verifyClassExist
String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(Code)

Parameters:
  javaClassName - The name of the java class to resolve.
Parameters:
  convertCase - whether to convert the case before resolving class alias. Resolved class name or class alias name.
exception:
  StandardException - Thrown on error



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.