Java Doc for SelectNode.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.Node
      oracle.toplink.essentials.internal.parsing.MajorNode
         oracle.toplink.essentials.internal.parsing.QueryNode
            oracle.toplink.essentials.internal.parsing.SelectNode

SelectNode
public class SelectNode extends QueryNode (Code)
INTERNAL

Purpose: Represent a SELECT

Responsibilities:

  • Hold the distinct status
  • Modify a query based on the contents The SELECT statement determines the return type of an EJBQL query. The SELECT may also determine the distinct state of a query A SELECT can be one of the following: 1. SELECT OBJECT(someObject)... This query will return a collection of objects 2. SELECT anObject.anAttribute ... This will return a collection of anAttribute 3. SELECT <aggregateFunction> ... This will return a single value The allowable aggregateFunctions are: AVG, COUNT, MAX, MIN, SUM SELECT AVG(emp.salary)... Returns the average of all the employees salaries SELECT COUNT(emp)... Returns a count of the employees SELECT COUNT(emp.firstName)... Returns a count of the employee's firstNames SELECT MAX(emp.salary)... Returns the maximum employee salary SELECT MIN(emp.salary)... Returns the minimum employee salary SELECT SUM(emp.salary)... Returns the sum of all the employees salaries

author:
   Jon Driscoll
since:
   TopLink 5.0



Constructor Summary
public  SelectNode()
    

Method Summary
public  voidapplyToQuery(DatabaseQuery theQuery, GenerationContext context)
    
public  DatabaseQuerycreateDatabaseQuery(ParseTreeContext context)
     INTERNAL Returns a DatabaseQuery instance representing the owning ParseTree.
public  ExpressiongenerateExpression(GenerationContext context)
    
public  ClassgetReferenceClass(GenerationContext context)
    
public  ListgetSelectExpressions()
    
public  booleanhasOneToOneSelected(GenerationContext context)
    
public  booleanisSelectNode()
    
public  booleanisSelected(String variableName)
     Answer true if the variable name given as argument is SELECTed.
public  booleanisVariableInINClauseSelected(GenerationContext context)
    
public  booleannodeRefersToObject(Node node, GenerationContext context)
    
public  NodequalifyAttributeAccess(ParseTreeContext context)
     INTERNAL Check the select expression nodes for a path expression starting with a unqualified field access and if so, replace it by a qualified field access.
public  ClassresolveClass(GenerationContext context)
     resolveClass: Answer the class associated with my left node.
public  voidsetDistinct(boolean distinct)
    
public  voidsetSelectExpressions(List exprs)
    
public  booleanusesDistinct()
    
public  voidvalidate(ParseTreeContext context)
     INTERNAL Validate node.
public  voidverifySelectedAlias(GenerationContext context)
     Verify that the selected alias is a valid alias.


Constructor Detail
SelectNode
public SelectNode()(Code)




Method Detail
applyToQuery
public void applyToQuery(DatabaseQuery theQuery, GenerationContext context)(Code)
INTERNAL Apply this node to the passed query



createDatabaseQuery
public DatabaseQuery createDatabaseQuery(ParseTreeContext context)(Code)
INTERNAL Returns a DatabaseQuery instance representing the owning ParseTree. This implementation returns a ReadAllQuery for simple SELECT queries and a ReportQuery otherwise.



generateExpression
public Expression generateExpression(GenerationContext context)(Code)
INTERNAL Return a TopLink expression generated using the left node



getReferenceClass
public Class getReferenceClass(GenerationContext context)(Code)
Compute the Reference class for this query
Parameters:
  context - the class this query is querying for



getSelectExpressions
public List getSelectExpressions()(Code)



hasOneToOneSelected
public boolean hasOneToOneSelected(GenerationContext context)(Code)
INTERNAL



isSelectNode
public boolean isSelectNode()(Code)



isSelected
public boolean isSelected(String variableName)(Code)
Answer true if the variable name given as argument is SELECTed. True: "SELECT OBJECT(emp) ...." & variableName = "emp" False: "SELECT OBJECT(somethingElse) ..." & variableName = "emp"



isVariableInINClauseSelected
public boolean isVariableInINClauseSelected(GenerationContext context)(Code)
INTERNAL Answer true if a variable in the IN clause is SELECTed



nodeRefersToObject
public boolean nodeRefersToObject(Node node, GenerationContext context)(Code)
INTERNAL Answer true if this node refers to an object described later in the EJBQL True: SELECT p FROM Project p False: SELECT p.id FROM Project p



qualifyAttributeAccess
public Node qualifyAttributeAccess(ParseTreeContext context)(Code)
INTERNAL Check the select expression nodes for a path expression starting with a unqualified field access and if so, replace it by a qualified field access.



resolveClass
public Class resolveClass(GenerationContext context)(Code)
resolveClass: Answer the class associated with my left node.



setDistinct
public void setDistinct(boolean distinct)(Code)



setSelectExpressions
public void setSelectExpressions(List exprs)(Code)



usesDistinct
public boolean usesDistinct()(Code)



validate
public void validate(ParseTreeContext context)(Code)
INTERNAL Validate node.



verifySelectedAlias
public void verifySelectedAlias(GenerationContext context)(Code)
Verify that the selected alias is a valid alias. If it's not valid, an Exception will be thrown, likely EJBQLException.aliasResolutionException. Valid: SELECT OBJECT(emp) FROM Employee emp WHERE ... Invalid: SELECT OBJECT(badAlias) FROM Employee emp WHERE ...



Methods inherited from oracle.toplink.essentials.internal.parsing.QueryNode
abstract public void applyToQuery(DatabaseQuery theQuery, GenerationContext context)(Code)(Java Doc)
abstract public DatabaseQuery createDatabaseQuery(ParseTreeContext context)(Code)(Java Doc)
abstract public Expression generateExpression(GenerationContext context)(Code)(Java Doc)
public ParseTree getParseTree()(Code)(Java Doc)
public Class getReferenceClass(GenerationContext genContext)(Code)(Java Doc)
public boolean isDeleteNode()(Code)(Java Doc)
public boolean isSelectNode()(Code)(Java Doc)
public boolean isUpdateNode()(Code)(Java Doc)
abstract public Class resolveClass(GenerationContext context)(Code)(Java Doc)
public void setParseTree(ParseTree parseTree)(Code)(Java Doc)

Methods inherited from oracle.toplink.essentials.internal.parsing.MajorNode
public ParseTreeContext getContext()(Code)(Java Doc)
public void setContext(ParseTreeContext context)(Code)(Java Doc)

Fields inherited from oracle.toplink.essentials.internal.parsing.Node
protected Node left(Code)(Java Doc)
protected Node right(Code)(Java Doc)
public boolean shouldGenerateExpression(Code)(Java Doc)

Methods inherited from oracle.toplink.essentials.internal.parsing.Node
public Expression addToExpression(Expression parentExpression, GenerationContext context)(Code)(Java Doc)
public Expression appendExpression(Expression left, Expression right)(Code)(Java Doc)
public void applyToQuery(ObjectLevelReadQuery theQuery, GenerationContext context)(Code)(Java Doc)
public Expression generateExpression(GenerationContext context)(Code)(Java Doc)
public String getAsString()(Code)(Java Doc)
public int getColumn()(Code)(Java Doc)
public Node getLeft()(Code)(Java Doc)
public int getLine()(Code)(Java Doc)
public Node getRight()(Code)(Java Doc)
public Object getType()(Code)(Java Doc)
public boolean hasLeft()(Code)(Java Doc)
public boolean hasRight()(Code)(Java Doc)
public boolean isAggregateNode()(Code)(Java Doc)
public boolean isAttributeNode()(Code)(Java Doc)
public boolean isConstructorNode()(Code)(Java Doc)
public boolean isCountNode()(Code)(Java Doc)
public boolean isDivideNode()(Code)(Java Doc)
public boolean isDotNode()(Code)(Java Doc)
public boolean isEscape()(Code)(Java Doc)
public boolean isLiteralNode()(Code)(Java Doc)
public boolean isMinusNode()(Code)(Java Doc)
public boolean isMultiplyNode()(Code)(Java Doc)
public boolean isNotNode()(Code)(Java Doc)
public boolean isParameterNode()(Code)(Java Doc)
public boolean isPlusNode()(Code)(Java Doc)
public boolean isSubqueryNode()(Code)(Java Doc)
public boolean isVariableNode()(Code)(Java Doc)
public Node qualifyAttributeAccess(ParseTreeContext context)(Code)(Java Doc)
public String resolveAttribute()(Code)(Java Doc)
public Class resolveClass(GenerationContext context)(Code)(Java Doc)
public Class resolveClass(GenerationContext context, Class ownerClass)(Code)(Java Doc)
public DatabaseMapping resolveMapping(GenerationContext context)(Code)(Java Doc)
public DatabaseMapping resolveMapping(GenerationContext context, Class ownerClass)(Code)(Java Doc)
public void setColumn(int column)(Code)(Java Doc)
public void setLeft(Node newLeft)(Code)(Java Doc)
public void setLine(int line)(Code)(Java Doc)
public void setRight(Node newRight)(Code)(Java Doc)
public void setType(Object type)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public String toString(int indent)(Code)(Java Doc)
public String toStringDisplayName()(Code)(Java Doc)
public void toStringIndent(int indent, StringBuffer buffer)(Code)(Java Doc)
public void validate(ParseTreeContext context)(Code)(Java Doc)
public void validateParameter(ParseTreeContext context, Object contextType)(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.