Java Doc for TableExpressionFromSet.java in  » Database-DBMS » mckoi » com » mckoi » database » interpret » 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 » mckoi » com.mckoi.database.interpret 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.mckoi.database.interpret.TableExpressionFromSet

TableExpressionFromSet
class TableExpressionFromSet (Code)
A set of tables and function references that make up the resources made available by a table expression. When a SelectQueriable is prepared this object is created and is used to dereference names to sources. It also has the ability to chain to another TableExpressionFromSet and resolve references over a complex sub-query hierarchy.
author:
   Tobias Downer



Constructor Summary
public  TableExpressionFromSet(DatabaseConnection connection)
     Constructs the object.

Method Summary
public  voidaddFunctionRef(String name, Expression expression)
     Adds a function resource to the set.
public  voidaddTable(FromTableInterface table_resource)
     Adds a table resource to the set.
 ExpressiondereferenceAssignment(Variable v)
     Dereferences a fully qualified reference that is within this set.
public  voidexposeAllColumns()
     Exposes all the columns in all the child tables.
public  voidexposeAllColumnsFromSource(FromTableInterface table)
     Exposes all the columns from the given FromTableInterface.
public  voidexposeAllColumnsFromSource(TableName tn)
     Exposes all the columns from the given table name.
public  voidexposeVariable(Variable v)
     Adds a variable in this from set that is exposed to the outside.
 ExpressionPreparerexpressionQualifier()
     Returns an ExpressionPreparer that qualifies all variables in an expression to either a qualified Variable or a CorrelatedVariable object.
 FromTableInterfacefindTable(String schema, String name)
     Returns the first FromTableInterface object that matches the given schema, table reference.
public  Variable[]generateResolvedVariableList()
     Returns a Variable[] array for each variable that is exposed in this from set.
public  TableExpressionFromSetgetParent()
     Returns the parent of this set.
 FromTableInterfacegetTable(int i)
     Returns the FromTableInterface object at the given index position in this set.
 CorrelatedVariableglobalResolveReference(int level, Variable v)
     Resolves the given Variable reference within the chained list of TableExpressionFromSet objects to a CorrelatedVariable.
 ObjectqualifyVariable(Variable v_in)
     Attempts to qualify the given Variable object to a value found either in this from set, or a value in the parent from set.
 VariableresolveReference(Variable v)
     Resolves the given Variable object to a fully resolved Variable within the context of this table expression.
 VariableresolveTableColumnReference(Variable v)
     Resolves the given Variable against the table columns in this from set. If the variable does not resolve to anything 'null' is returned.
public  voidsetCaseInsensitive(boolean status)
     Toggle the case sensitivity flag.
 intsetCount()
     Returns the number of FromTableInterface objects in this set.
public  voidsetParent(TableExpressionFromSet parent)
     Sets the parent of this expression.
 booleanstringCompare(String str1, String str2)
    


Constructor Detail
TableExpressionFromSet
public TableExpressionFromSet(DatabaseConnection connection)(Code)
Constructs the object.




Method Detail
addFunctionRef
public void addFunctionRef(String name, Expression expression)(Code)
Adds a function resource to the set. Note that is possible for there to be references in the 'expression' that do not reference resources in this set. For example, a correlated reference.



addTable
public void addTable(FromTableInterface table_resource)(Code)
Adds a table resource to the set.



dereferenceAssignment
Expression dereferenceAssignment(Variable v)(Code)
Dereferences a fully qualified reference that is within this set. For example, SELECT ( a + b ) AS z given 'z' would return the expression (a + b).

Returns null if unable to dereference assignment because it does not exist.




exposeAllColumns
public void exposeAllColumns()(Code)
Exposes all the columns in all the child tables.



exposeAllColumnsFromSource
public void exposeAllColumnsFromSource(FromTableInterface table)(Code)
Exposes all the columns from the given FromTableInterface.



exposeAllColumnsFromSource
public void exposeAllColumnsFromSource(TableName tn)(Code)
Exposes all the columns from the given table name.



exposeVariable
public void exposeVariable(Variable v)(Code)
Adds a variable in this from set that is exposed to the outside. This list should contain all references from the SELECT ... part of the query. For example, SELECT a, b, (a + 1) d exposes variables a, b and d.



expressionQualifier
ExpressionPreparer expressionQualifier()(Code)
Returns an ExpressionPreparer that qualifies all variables in an expression to either a qualified Variable or a CorrelatedVariable object.



findTable
FromTableInterface findTable(String schema, String name)(Code)
Returns the first FromTableInterface object that matches the given schema, table reference. Returns null if no objects with the given schema/name reference match.



generateResolvedVariableList
public Variable[] generateResolvedVariableList()(Code)
Returns a Variable[] array for each variable that is exposed in this from set. This is a list of fully qualified variables that are referencable from the final result of the table expression.



getParent
public TableExpressionFromSet getParent()(Code)
Returns the parent of this set. If it has no parent it returns null.



getTable
FromTableInterface getTable(int i)(Code)
Returns the FromTableInterface object at the given index position in this set.



globalResolveReference
CorrelatedVariable globalResolveReference(int level, Variable v)(Code)
Resolves the given Variable reference within the chained list of TableExpressionFromSet objects to a CorrelatedVariable. If the reference is not found in this set the method recurses to the parent set. The first unambiguous reference is returned.

If resolution is ambiguous within a set, a StatementException is thrown.

Returns null if the reference could not be resolved.




qualifyVariable
Object qualifyVariable(Variable v_in)(Code)
Attempts to qualify the given Variable object to a value found either in this from set, or a value in the parent from set. A variable that is qualified by the parent is called a correlated variable. Any correlated variables that are successfully qualified are returned as CorrelatedVariable objects.



resolveReference
Variable resolveReference(Variable v)(Code)
Resolves the given Variable object to a fully resolved Variable within the context of this table expression. If the variable does not resolve to anything 'null' is returned. If the variable is ambiguous, a StatementException is thrown.

If the variable name references a table column, an expression with a single Variable element is returned. If the variable name references a function, an expression of the function is returned.

Note that the given variable does not have to be fully qualified but the returned expressions are fully qualified.




resolveTableColumnReference
Variable resolveTableColumnReference(Variable v)(Code)
Resolves the given Variable against the table columns in this from set. If the variable does not resolve to anything 'null' is returned. If the variable is ambiguous, a StatementException is thrown.

Note that the given variable does not have to be fully qualified but the returned expressions are fully qualified.




setCaseInsensitive
public void setCaseInsensitive(boolean status)(Code)
Toggle the case sensitivity flag.



setCount
int setCount()(Code)
Returns the number of FromTableInterface objects in this set.



setParent
public void setParent(TableExpressionFromSet parent)(Code)
Sets the parent of this expression. parent can be set to null.



stringCompare
boolean stringCompare(String str1, String str2)(Code)



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.