Java Doc for VirtualColumnNode.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
      org.apache.derby.impl.sql.compile.ValueNode
         org.apache.derby.impl.sql.compile.VirtualColumnNode

VirtualColumnNode
public class VirtualColumnNode extends ValueNode (Code)
A VirtualColumnNode represents a virtual column reference to a column in a row returned by an underlying ResultSetNode. The underlying column could be in a base table, view (which could expand into a complex expression), subquery in the FROM clause, temp table, expression result, etc. By the time we get to code generation, all VirtualColumnNodes should stand only for references to columns in a base table within a FromBaseTable.
author:
   Jeff Lichtman


Field Summary
 intcolumnId
    
 booleancorrelated
    
 ResultColumnsourceColumn
    
 ResultSetNodesourceResultSet
    


Method Summary
public  voidgenerateExpression(ExpressionClassBuilder acb, MethodBuilder mb)
     ColumnNode's are against the current row in the system.
 booleangetCorrelated()
     Return whether or not this VCN is a correlated reference.
protected  intgetOrderableVariantType()
     Return the variant type for the underlying expression.
public  StringgetSchemaName()
     Get the name of the schema the ResultColumn's table is in, if any. The return value will be null if the user did not supply a schema name (for example, select t.a from t). Another example for null return value (for example, select b.a from t as b). But for following query select app.t.a from t, this will return APP A String containing the name of the schema for the Column's table.If the column is not in a schema (i.e.
public  ResultColumngetSourceColumn()
     Return the ResultColumn that is the source of this VirtualColumnNode.
public  ResultColumngetSourceResultColumn()
     Return the ResultColumn that is the source of this VirtualColumnNode.
public  ResultSetNodegetSourceResultSet()
     Return the ResultSetNode that is the source of this VirtualColumnNode.
public  StringgetTableName()
     Get the name of the table the ResultColumn is in, if any.
public  DataTypeDescriptorgetTypeServices()
     Get the DataTypeServices from this Node. The DataTypeServices from this Node.
public  voidinit(Object sourceResultSet, Object sourceColumn, Object columnId)
     Initializer for a VirtualColumnNode.
public  booleanisCloneable()
     Return whether or not this expression tree is cloneable.
protected  booleanisEquivalent(ValueNode o)
    
public  voidprintSubNodes(int depth)
     Prints the sub-nodes of this object.
 voidsetCorrelated()
     Mark this VCN as a reference to a correlated column.
public  booleanupdatableByCursor()
     Return whether or not the ResultColumn is wirtable by a positioned update.

Field Detail
columnId
int columnId(Code)



correlated
boolean correlated(Code)



sourceColumn
ResultColumn sourceColumn(Code)



sourceResultSet
ResultSetNode sourceResultSet(Code)





Method Detail
generateExpression
public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)
ColumnNode's are against the current row in the system. This lets us generate a faster get that simply returns the column from the current row, rather than getting the value out and returning that, only to have the caller (in the situations needed) stuffing it back into a new column holder object. We will assume the general generate() path is for getting the value out, and use generateColumn() when we want to keep the column wrapped.
exception:
  StandardException - Thrown on error



getCorrelated
boolean getCorrelated()(Code)
Return whether or not this VCN is a correlated reference. Whether or not this VCN is a correlated reference.



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.
exception:
  StandardException - thrown on error



getSchemaName
public String getSchemaName() throws StandardException(Code)
Get the name of the schema the ResultColumn's table is in, if any. The return value will be null if the user did not supply a schema name (for example, select t.a from t). Another example for null return value (for example, select b.a from t as b). But for following query select app.t.a from t, this will return APP A String containing the name of the schema for the Column's table.If the column is not in a schema (i.e. derived column), it returns NULL.



getSourceColumn
public ResultColumn getSourceColumn()(Code)
Return the ResultColumn that is the source of this VirtualColumnNode. ResultSetNode



getSourceResultColumn
public ResultColumn getSourceResultColumn()(Code)
Return the ResultColumn that is the source of this VirtualColumnNode. ResultSetNode



getSourceResultSet
public ResultSetNode getSourceResultSet()(Code)
Return the ResultSetNode that is the source of this VirtualColumnNode. ResultSetNode



getTableName
public String getTableName()(Code)
Get the name of the table the ResultColumn is in, if any. This will be null if the user did not supply a name (for example, select a from t). The method will return B for this example, select b.a from t as b The method will return T for this example, select t.a from t A String containing the name of the table the Columnis in. If the column is not in a table (i.e. is aderived column), it returns NULL.



getTypeServices
public DataTypeDescriptor getTypeServices() throws StandardException(Code)
Get the DataTypeServices from this Node. The DataTypeServices from this Node. Thismay be null if the node isn't bound yet.



init
public void init(Object sourceResultSet, Object sourceColumn, Object columnId) throws StandardException(Code)
Initializer for a VirtualColumnNode.
Parameters:
  sourceResultSet - The ResultSetNode where the value is originating
Parameters:
  sourceColumn - The ResultColumn where the value is originating
Parameters:
  columnId - The columnId within the current Row



isCloneable
public boolean isCloneable()(Code)
Return whether or not this expression tree is cloneable. boolean Whether or not this expression tree is cloneable.



isEquivalent
protected boolean isEquivalent(ValueNode o) throws StandardException(Code)



printSubNodes
public void printSubNodes(int depth)(Code)
Prints the sub-nodes of this object. See QueryTreeNode.java for how tree printing is supposed to work.
Parameters:
  depth - The depth of this node in the tree



setCorrelated
void setCorrelated()(Code)
Mark this VCN as a reference to a correlated column. (It's source resultSet is an outer ResultSet.



updatableByCursor
public boolean updatableByCursor()(Code)
Return whether or not the ResultColumn is wirtable by a positioned update. TRUE, if the column is a base column of a table and is writable by a positioned update.



Fields inherited from org.apache.derby.impl.sql.compile.ValueNode
final public static int IN_HAVING_CLAUSE(Code)(Java Doc)
final public static int IN_SELECT_LIST(Code)(Java Doc)
final public static int IN_UNKNOWN_CLAUSE(Code)(Java Doc)
final public static int IN_WHERE_CLAUSE(Code)(Java Doc)
protected int clause(Code)(Java Doc)
protected DataTypeDescriptor dataTypeServices(Code)(Java Doc)
boolean transformed(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.sql.compile.ValueNode
public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) throws StandardException(Code)(Java Doc)
public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector, boolean forQueryRewrite) throws StandardException(Code)(Java Doc)
public boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException(Code)(Java Doc)
public ValueNode changeToCNF(boolean underTopAndNode) throws StandardException(Code)(Java Doc)
public ValueNode checkIsBoolean() throws StandardException(Code)(Java Doc)
public void checkReliability(String fragmentType, int fragmentBitMask) throws StandardException(Code)(Java Doc)
public void checkReliability(int fragmentBitMask, String fragmentType) throws StandardException(Code)(Java Doc)
void checkTopPredicatesForEqualsConditions(int tableNumber, boolean[] eqOuterCols, int[] tableNumbers, JBitSet[] tableColMap, boolean resultColTable) throws StandardException(Code)(Java Doc)
public boolean constantExpression(PredicateList whereClause)(Code)(Java Doc)
public void copyFields(ValueNode oldVN) throws StandardException(Code)(Java Doc)
ValueNode eliminateNots(boolean underNotNode) throws StandardException(Code)(Java Doc)
public ValueNode genEqualsFalseTree() throws StandardException(Code)(Java Doc)
public ValueNode genIsNullTree() throws StandardException(Code)(Java Doc)
public ValueNode genSQLJavaSQLTree() throws StandardException(Code)(Java Doc)
final protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
public void generateFilter(ExpressionClassBuilder ecb, MethodBuilder mb) throws StandardException(Code)(Java Doc)
public int getClause()(Code)(Java Doc)
public ValueNode getClone() throws StandardException(Code)(Java Doc)
public String getColumnName()(Code)(Java Doc)
Object getConstantValueAsObject() throws StandardException(Code)(Java Doc)
final protected DataValueFactory getDataValueFactory()(Code)(Java Doc)
protected int getOrderableVariantType() throws StandardException(Code)(Java Doc)
public String getSchemaName() throws StandardException(Code)(Java Doc)
public ResultColumn getSourceResultColumn()(Code)(Java Doc)
public String getTableName()(Code)(Java Doc)
JBitSet getTablesReferenced() throws StandardException(Code)(Java Doc)
boolean getTransformed()(Code)(Java Doc)
public TypeCompiler getTypeCompiler() throws StandardException(Code)(Java Doc)
public TypeId getTypeId() throws StandardException(Code)(Java Doc)
public DataTypeDescriptor getTypeServices() throws StandardException(Code)(Java Doc)
public void init(Object typeId, Object precision, Object scale, Object isNullable, Object maximumWidth) throws StandardException(Code)(Java Doc)
public boolean isBinaryEqualsOperatorNode()(Code)(Java Doc)
boolean isBooleanFalse()(Code)(Java Doc)
boolean isBooleanTrue()(Code)(Java Doc)
public boolean isCloneable()(Code)(Java Doc)
public boolean isConstantExpression()(Code)(Java Doc)
abstract protected boolean isEquivalent(ValueNode other) throws StandardException(Code)(Java Doc)
public boolean isParameterNode()(Code)(Java Doc)
public boolean isRelationalOperator()(Code)(Java Doc)
final protected boolean isSameNodeType(ValueNode other)(Code)(Java Doc)
public boolean optimizableEqualityNode(Optimizable optTable, int columnNumber, boolean isNullOkay) throws StandardException(Code)(Java Doc)
public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException(Code)(Java Doc)
public ValueNode putAndsOnTop() throws StandardException(Code)(Java Doc)
public ValueNode remapColumnReferencesToExpressions() throws StandardException(Code)(Java Doc)
public boolean requiresTypeFromContext()(Code)(Java Doc)
public double selectivity(Optimizable optTable) throws StandardException(Code)(Java Doc)
public void setClause(int clause)(Code)(Java Doc)
void setTransformed()(Code)(Java Doc)
public void setType(DataTypeDescriptor dataTypeServices) throws StandardException(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public boolean updatableByCursor()(Code)(Java Doc)
public boolean verifyChangeToCNF()(Code)(Java Doc)
boolean verifyEliminateNots()(Code)(Java Doc)
public boolean verifyPutAndsOnTop()(Code)(Java Doc)

Fields inherited from org.apache.derby.impl.sql.compile.QueryTreeNode
final public static int AUTOINCREMENT_CREATE_MODIFY(Code)(Java Doc)
final public static int AUTOINCREMENT_INC_INDEX(Code)(Java Doc)
final public static int AUTOINCREMENT_IS_AUTOINCREMENT_INDEX(Code)(Java Doc)
final public static int AUTOINCREMENT_START_INDEX(Code)(Java Doc)
boolean isPrivilegeCollectionRequired(Code)(Java Doc)

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)

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.