Java Doc for ParseTree.java in  » Database-ORM » toplink » oracle » toplink » essentials » internal » parsing » 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 ORM » toplink » oracle.toplink.essentials.internal.parsing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   oracle.toplink.essentials.internal.parsing.ParseTree

All known Subclasses:   oracle.toplink.essentials.internal.parsing.EJBQLParseTree,
ParseTree
public class ParseTree (Code)
INTERNAL

Purpose: A ParseTree contains Node(s). This contains a root Node and provides traversal utilities.

Responsibilities:

  • Add parameters to the query
  • Generate an expression for the query
  • Answer true if the tree has parameters
  • Maintain the primary class name for the query
  • Maintain the root of the parse tree
  • Maintain the context for the parse tree
  • Maintainthe distinct state for the parse tree
  • Print the contents of the parse tree on a string

author:
   Jon Driscoll and Joel Lucuik
since:
   TopLink 4.0



Constructor Summary
public  ParseTree()
     Return a new ParseTree.

Method Summary
public  voidaddGroupingToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext)
    
public  voidaddHavingToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext)
    
public  voidaddNonFetchJoinAttributes(ObjectLevelReadQuery theQuery, GenerationContext generationContext)
    
public  voidaddOrderingToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext)
    
public  voidaddParametersToQuery(DatabaseQuery query)
    
public  voidaddUpdatesToQuery(UpdateAllQuery theQuery, GenerationContext generationContext)
    
public  voidadjustReferenceClassForQuery(DatabaseQuery theQuery, GenerationContext generationContext)
    
public  voidapplyQueryNodeToQuery(DatabaseQuery theQuery, GenerationContext generationContext)
     INTERNAL Apply the select or update to the passed query.
public  GenerationContextbuildContext(DatabaseQuery query, AbstractSession sessionForContext)
    
public  GenerationContextbuildContextForReadQuery(AbstractSession sessionForContext)
    
public  DatabaseQuerycreateDatabaseQuery()
     INTERNAL Returns a DatabaseQuery instance for this ParseTree.
public  ExpressiongenerateExpression(DatabaseQuery readQuery, GenerationContext generationContext)
    
public  ClassLoadergetClassLoader()
    
public  ParseTreeContextgetContext()
    
public  shortgetDistinctState()
    
public  FromNodegetFromNode()
    
public  GroupByNodegetGroupByNode()
    
public  HavingNodegetHavingNode()
    
public  OrderByNodegetOrderByNode()
    
public  QueryNodegetQueryNode()
    
public  ClassgetReferenceClass(DatabaseQuery query, GenerationContext generationContext)
     getReferenceClass(): Answer the class which will be the reference class for the query.
public  SetNodegetSetNode()
    
public  WhereNodegetWhereNode()
    
public  booleanhasGroupBy()
    
public  booleanhasHaving()
    
public  booleanhasOrderBy()
    
public  voidinitBaseExpression(ObjectLevelReadQuery theQuery, GenerationContext generationContext)
     INTERNAL Initialize the base expression in the generation context.
public  voidinitBaseExpression(ModifyAllQuery theQuery, GenerationContext generationContext)
     INTERNAL Initialize the base expression in the generation context.
protected  voidqualifyAttributeAccess(ParseTreeContext context)
     INTERNAL This method handles any unqualified field access in bulk UPDATE and DELETE statements.
public  voidsetClassLoader(ClassLoader loader)
    
public  voidsetContext(ParseTreeContext newContext)
    
public  voidsetDistinctState(short newDistinctState)
    
public  voidsetFromNode(FromNode fromNode)
    
public  voidsetGroupByNode(GroupByNode newGroupByNode)
    
public  voidsetHavingNode(HavingNode newHavingNode)
    
public  voidsetOrderByNode(OrderByNode newOrderByNode)
    
public  voidsetQueryNode(QueryNode newQueryNode)
    
public  voidsetSelectionCriteriaForQuery(DatabaseQuery theQuery, GenerationContext generationContext)
    
public  voidsetSetNode(SetNode newSetNode)
    
public  voidsetWhereNode(WhereNode newWhereNode)
    
public  StringtoString()
    
public  booleanusesDistinct()
     INTERNAL Answer true if DISTINCT has been chosen.
protected  voidvalidate(AbstractSession session, ClassLoader classLoader)
     INTERNAL Validate the parse tree.
public  voidvalidate(TypeHelper typeHelper)
     INTERNAL Validate the parse tree.
public  voidvalidate(ParseTreeContext context)
     INTERNAL Validate the parse tree.
public  voidverifySelect(DatabaseQuery theQuery, GenerationContext generationContext)
     INTERNAL Verify that the alias in the SELECT is valid.


Constructor Detail
ParseTree
public ParseTree()(Code)
Return a new ParseTree.




Method Detail
addGroupingToQuery
public void addGroupingToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL Add the grouping to the passed query



addHavingToQuery
public void addHavingToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL Add the having to the passed query



addNonFetchJoinAttributes
public void addNonFetchJoinAttributes(ObjectLevelReadQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL



addOrderingToQuery
public void addOrderingToQuery(ObjectLevelReadQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL Add the ordering to the passed query



addParametersToQuery
public void addParametersToQuery(DatabaseQuery query)(Code)
INTERNAL Add parameters to the query



addUpdatesToQuery
public void addUpdatesToQuery(UpdateAllQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL Add the updates to the passed query



adjustReferenceClassForQuery
public void adjustReferenceClassForQuery(DatabaseQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL Adjust the reference class of the passed query if necessary Need to test this for Employee, employee.getAddress(), report query



applyQueryNodeToQuery
public void applyQueryNodeToQuery(DatabaseQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL Apply the select or update to the passed query. If there is a single attribute being selected, add it to the query result set If an aggregate is being used, add it to the query result set



buildContext
public GenerationContext buildContext(DatabaseQuery query, AbstractSession sessionForContext)(Code)
INTERNAL Build the context to be used when generating the expression from the parse tree



buildContextForReadQuery
public GenerationContext buildContextForReadQuery(AbstractSession sessionForContext)(Code)
INTERNAL Build the context to be used when generating the expression from the parse tree



createDatabaseQuery
public DatabaseQuery createDatabaseQuery()(Code)
INTERNAL Returns a DatabaseQuery instance for this ParseTree.



generateExpression
public Expression generateExpression(DatabaseQuery readQuery, GenerationContext generationContext)(Code)
INTERNAL Build a context for the expression generation



getClassLoader
public ClassLoader getClassLoader()(Code)
INTERNAL Return a class loader java.lang.ClassLoader



getContext
public ParseTreeContext getContext()(Code)
Return the context for this parse tree



getDistinctState
public short getDistinctState()(Code)
INTERNAL Return the DISTINCT state for the tree



getFromNode
public FromNode getFromNode()(Code)
INTERNAL Return the FROM Node



getGroupByNode
public GroupByNode getGroupByNode()(Code)
INTERNAL Return the GroupByNode



getHavingNode
public HavingNode getHavingNode()(Code)
INTERNAL Return the HavingNode



getOrderByNode
public OrderByNode getOrderByNode()(Code)
INTERNAL Return the OrderByNode



getQueryNode
public QueryNode getQueryNode()(Code)
INTERNAL Return the root node for the tree



getReferenceClass
public Class getReferenceClass(DatabaseQuery query, GenerationContext generationContext)(Code)
getReferenceClass(): Answer the class which will be the reference class for the query. Resolve this using the node parsed from the "SELECT" of the EJBQL query string



getSetNode
public SetNode getSetNode()(Code)
INTERNAL Return the set node for the tree



getWhereNode
public WhereNode getWhereNode()(Code)
INTERNAL Return the Where node



hasGroupBy
public boolean hasGroupBy()(Code)
INTERNAL Does this EJBQL have a Grouping Clause



hasHaving
public boolean hasHaving()(Code)
INTERNAL Does this EJBQL have a Having Clause



hasOrderBy
public boolean hasOrderBy()(Code)
INTERNAL Does this EJBQL have an Ordering Clause



initBaseExpression
public void initBaseExpression(ObjectLevelReadQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL Initialize the base expression in the generation context.



initBaseExpression
public void initBaseExpression(ModifyAllQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL Initialize the base expression in the generation context.



qualifyAttributeAccess
protected void qualifyAttributeAccess(ParseTreeContext context)(Code)
INTERNAL This method handles any unqualified field access in bulk UPDATE and DELETE statements. A UPDATE or DELETE statement may not define an identification variable. In this case any field accessed from the current class is not qualified with an identification variable, e.g. UPDATE Customer SET name = :newname The method goes through the expressions of the SET clause and the WHERE clause of such an DELETE and UPDATE statement and qualifies the field access using the abstract schema name as qualifier.



setClassLoader
public void setClassLoader(ClassLoader loader)(Code)
INTERNAL: Set the class loader for this parse tree
Parameters:
  loader -



setContext
public void setContext(ParseTreeContext newContext)(Code)
INTERNAL Set the context for this parse tree



setDistinctState
public void setDistinctState(short newDistinctState)(Code)
INTERNAL Set the DISTINCT state for the tree



setFromNode
public void setFromNode(FromNode fromNode)(Code)
INTERNAL Set the FROM node for the query



setGroupByNode
public void setGroupByNode(GroupByNode newGroupByNode)(Code)
INTERNAL Set the Group by node



setHavingNode
public void setHavingNode(HavingNode newHavingNode)(Code)
INTERNAL Set the Having node



setOrderByNode
public void setOrderByNode(OrderByNode newOrderByNode)(Code)
INTERNAL Set the Order by node



setQueryNode
public void setQueryNode(QueryNode newQueryNode)(Code)
INTERNAL Set the Select node



setSelectionCriteriaForQuery
public void setSelectionCriteriaForQuery(DatabaseQuery theQuery, GenerationContext generationContext)(Code)



setSetNode
public void setSetNode(SetNode newSetNode)(Code)
INTERNAL Set the Where node



setWhereNode
public void setWhereNode(WhereNode newWhereNode)(Code)
INTERNAL Set the Where node



toString
public String toString()(Code)
INTERNAL Print the contents of the parse tree on a string



usesDistinct
public boolean usesDistinct()(Code)
INTERNAL Answer true if DISTINCT has been chosen.



validate
protected void validate(AbstractSession session, ClassLoader classLoader)(Code)
INTERNAL Validate the parse tree.



validate
public void validate(TypeHelper typeHelper)(Code)
INTERNAL Validate the parse tree.



validate
public void validate(ParseTreeContext context)(Code)
INTERNAL Validate the parse tree.



verifySelect
public void verifySelect(DatabaseQuery theQuery, GenerationContext generationContext)(Code)
INTERNAL Verify that the alias in the SELECT is valid. Invalid: SELECT OBJECT(badAlias) FROM Employee employee.... Valid: SELECT OBJECT(employee) FROM Employee employee....



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.