Java Doc for SelectExp.java in  » Testing » PolePosition-0.20 » com » versant » core » jdbc » sql » exp » 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 » Testing » PolePosition 0.20 » com.versant.core.jdbc.sql.exp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.versant.core.jdbc.sql.exp.SqlExp
      com.versant.core.jdbc.sql.exp.LeafExp
         com.versant.core.jdbc.sql.exp.SelectExp

All known Subclasses:   com.versant.core.jdbc.sql.exp.NotExistsExp,  com.versant.core.jdbc.sql.exp.ExistsSelectExp,
SelectExp
public class SelectExp extends LeafExp (Code)
A 'select ... from ... where ... order by ...' expression.


Field Summary
final public static  ColumnStruct[]EMPTY_COLUMS_STRUCT
    
public  Stringalias
     The alias assigned to our table (null if none).
public  booleandistinct
    
public  FetchSpecfetchSpec
    
public  booleanforUpdate
    
public  SqlExpgroupByList
    
public  HavingExphavingExp
    
public  JdbcFieldjdbcField
     The field that was navigated to get to this table (null if none).
public  JoinjoinList
     Linked list of joins (null if none).
public  intorderByEndIndex
     Index of the end of the "order by ..." clause + 1 as of the last call to appendSQL.
public  SqlExporderByList
     Linked list of expressions to order by (null if none).
public  intorderByStartIndex
     Index of the start of the "order by ..." clause as of the last call to appendSQL.
public  booleanouter
    
public  SqlExpresultList
    
public  SqlExpselectList
     Linked list of expressions to select (null if none).
public  intselectListCountBeforeAggregate
    
public  intselectListEndIndex
     Index of the last column in the select list + 1 as of the last call to appendSQL.
public  intselectListFirstColEndIndex
     Index of the last charcter of the first column in the select list + 1 as of the last call to appendSQL.
public  intselectListStartIndex
     Index of the first column in the select list as of the last call to appendSQL.
public  SqlExpsubSelectJoinExp
     The 'join' expression for a sub select (null if none).
public  JdbcTabletable
     The table to select from.
public  VarNodevar
     The variable this expression belongs to (null if none).
public  SqlExpwhereExp
     The where clause expression (null if none).

Constructor Summary
public  SelectExp()
    

Method Summary
public  voidaddJoin(Join join)
     Add a Join to end of the joinList.
public  JoinaddJoin(JdbcColumn[] leftCols, JdbcColumn[] rightCols, SelectExp right)
     Add a join to the end of the join list.
public  voidaddJoinMerge(Join aJoin)
     Add a Join to end of the joinList.
public  SqlExpaddOrderBy(OrderNode[] orders, boolean append)
     Add an order-by expression this to this select.
public  SqlExpaddOrderBy(OrderNode[] orders, boolean append, JDOQLNodeToSqlExp visitor)
     Add an order-by expression this to this select.
public  voidappendOrderByExp(SqlExp orderExp)
     Append the orderExp at the end of the current orderExp.
public  voidappendOrderByForColumns(JdbcColumn[] columns)
     Append the columns at the end of the orderByList as ascending.
public  voidappendOrderByForColumns(JdbcColumn column)
     Append the column at the end of the orderByList as ascending.
public  voidappendOrderByForColumns(JdbcColumn[] columns, SelectExp se)
    
public  voidappendSQLImp(SqlDriver driver, CharBuf s, SqlExp leftSibling)
     Append SQL for this node to s.
public  voidappendToSubSelectJoinExp(SqlExp e)
     Append e to the subSelectJoinExp clause of this select.
public  voidappendToWhereExp(SqlExp e)
     Append e to the where clause of this select.
public  booleancontainsOrderExp(JdbcColumn jdbcColumn)
    
public  intcreateAlias(int index)
     Create an aliases for any tables we may have if we do not already have an alias.
public  ColumnExp[]createColumnExpForOrdering(ClassMetaData target, SelectExp root)
    
public  SqlExpcreateInstance()
    
public  SqlExpcreateJoinExp(JdbcColumn[] leftCols, JdbcColumn[] rightCols, SelectExp right)
     Create an expression to join us to right.
public static  SelectExpcreateJoinToSuperTable(SelectExp root, JdbcField jdbcField)
     Used to obtain a selectexp for a field.
public static  SelectExpcreateJoinToSuperTable(SelectExp root, SelectExp joinFromExp, JdbcColumn[] lJoinColumns, JdbcField jdbcField)
     Used to obtain a selectexp for a field.
public static  SelectExpcreateJoinToSuperTable(SelectExp root, JdbcTable table)
     Used to obtain a selectexp for a field.
public  voiddump(String indent)
     Dump debugging info to System.out.
public static  voiddumpJoinList(SelectExp joinFromExp, String val)
    
public static  voiddumpJoinListRec(SelectExp joinFromExp, String indent)
    
public  JoinfindJoin(JdbcField jdbcField)
     Search our join list for a join for the field.
public  JoinfindJoin(JdbcTable table, JdbcField jdbcField)
     Find a join by table and refField.
public  JoinfindJoin(SelectExp se)
     Search our join list for a join to the expression.
public  JoinfindJoinRec(JdbcField jdbcField)
     Recursively search our join list for a join for the field.
public  SelectExpfindTable(JdbcTable t)
     If our table is t then return this.
public  SelectExpfindTableRecursive(JdbcTable t, JdbcField field)
    
public  SelectExpfindTableRecursive(JdbcTable t)
    
protected  voidfinishSelectList(CharBuf s, int start)
     Check that the select list is valid.
public  SqlExpgetClone(SqlExp clone, Map cloneMap)
    
public  JoingetLastJoin()
    
public  SqlExpgetOuterJoinMatchedExp()
     Get an expression that is true if this join produces a fully populated row (i.e.
public  SqlExpgetOuterJoinNotMatchedExp()
     Get an expression that is true if this join does not produce a fully populated row (i.e.
public  intgetSelectListColumnCount()
     Count the number of columns in the select list and all joined to lists.
public  booleanisJoinToManyTable()
     Does this select contain a join to a many table that may produce multiple rows? This is used to decide on setting the distinct flag if this select is converterd into an outer join.
public static  voidmergeJoinList(Join j)
    
public  SqlExpnormalize(SqlDriver driver, SelectExp sel, boolean convertExists)
     Normalize this node i.e.
public  voidprependOrderByForColumns(JdbcColumn[] columns)
     Insert the columns at the start of the orderByList as ascending.
public  voidreplaceSelectExpRef(SelectExp old, SelectExp nw)
     Replace any references to old with nw.
public  voidsetOuterRec()
     Set our outer flag and follow all our joins and make then outer as well.
public  StringtoString()
    

Field Detail
EMPTY_COLUMS_STRUCT
final public static ColumnStruct[] EMPTY_COLUMS_STRUCT(Code)



alias
public String alias(Code)
The alias assigned to our table (null if none).



distinct
public boolean distinct(Code)
Is this a 'select distinct'?



fetchSpec
public FetchSpec fetchSpec(Code)



forUpdate
public boolean forUpdate(Code)
Is this a 'select for update'?



groupByList
public SqlExp groupByList(Code)



havingExp
public HavingExp havingExp(Code)



jdbcField
public JdbcField jdbcField(Code)
The field that was navigated to get to this table (null if none).



joinList
public Join joinList(Code)
Linked list of joins (null if none). Note that the selectExp for each entry in the list may have its own joinList and so on recusively (i.e. this is actually a tree).



orderByEndIndex
public int orderByEndIndex(Code)
Index of the end of the "order by ..." clause + 1 as of the last call to appendSQL.



orderByList
public SqlExp orderByList(Code)
Linked list of expressions to order by (null if none).



orderByStartIndex
public int orderByStartIndex(Code)
Index of the start of the "order by ..." clause as of the last call to appendSQL.



outer
public boolean outer(Code)
Is table involved in an outer join as the outer table?



resultList
public SqlExp resultList(Code)



selectList
public SqlExp selectList(Code)
Linked list of expressions to select (null if none).



selectListCountBeforeAggregate
public int selectListCountBeforeAggregate(Code)



selectListEndIndex
public int selectListEndIndex(Code)
Index of the last column in the select list + 1 as of the last call to appendSQL.



selectListFirstColEndIndex
public int selectListFirstColEndIndex(Code)
Index of the last charcter of the first column in the select list + 1 as of the last call to appendSQL.



selectListStartIndex
public int selectListStartIndex(Code)
Index of the first column in the select list as of the last call to appendSQL.



subSelectJoinExp
public SqlExp subSelectJoinExp(Code)
The 'join' expression for a sub select (null if none). This will end up in the where clause but is kept separately so nested sub selects can be converted into joins easily.



table
public JdbcTable table(Code)
The table to select from.



var
public VarNode var(Code)
The variable this expression belongs to (null if none).



whereExp
public SqlExp whereExp(Code)
The where clause expression (null if none).




Constructor Detail
SelectExp
public SelectExp()(Code)




Method Detail
addJoin
public void addJoin(Join join)(Code)
Add a Join to end of the joinList.



addJoin
public Join addJoin(JdbcColumn[] leftCols, JdbcColumn[] rightCols, SelectExp right)(Code)
Add a join to the end of the join list.



addJoinMerge
public void addJoinMerge(Join aJoin)(Code)
Add a Join to end of the joinList. This is an attempt to not add uncess. joins.



addOrderBy
public SqlExp addOrderBy(OrderNode[] orders, boolean append)(Code)
Add an order-by expression this to this select.



addOrderBy
public SqlExp addOrderBy(OrderNode[] orders, boolean append, JDOQLNodeToSqlExp visitor)(Code)
Add an order-by expression this to this select.



appendOrderByExp
public void appendOrderByExp(SqlExp orderExp)(Code)
Append the orderExp at the end of the current orderExp.



appendOrderByForColumns
public void appendOrderByForColumns(JdbcColumn[] columns)(Code)
Append the columns at the end of the orderByList as ascending.



appendOrderByForColumns
public void appendOrderByForColumns(JdbcColumn column)(Code)
Append the column at the end of the orderByList as ascending.



appendOrderByForColumns
public void appendOrderByForColumns(JdbcColumn[] columns, SelectExp se)(Code)
Append the columns to the orderByList



appendSQLImp
public void appendSQLImp(SqlDriver driver, CharBuf s, SqlExp leftSibling)(Code)
Append SQL for this node to s.
Parameters:
  driver - The driver being used
Parameters:
  s - Append the SQL here
Parameters:
  leftSibling -



appendToSubSelectJoinExp
public void appendToSubSelectJoinExp(SqlExp e)(Code)
Append e to the subSelectJoinExp clause of this select. This will create a new AndExp if needed.



appendToWhereExp
public void appendToWhereExp(SqlExp e)(Code)
Append e to the where clause of this select. This will create a new AndExp if needed.



containsOrderExp
public boolean containsOrderExp(JdbcColumn jdbcColumn)(Code)



createAlias
public int createAlias(int index)(Code)
Create an aliases for any tables we may have if we do not already have an alias.



createColumnExpForOrdering
public ColumnExp[] createColumnExpForOrdering(ClassMetaData target, SelectExp root)(Code)



createInstance
public SqlExp createInstance()(Code)



createJoinExp
public SqlExp createJoinExp(JdbcColumn[] leftCols, JdbcColumn[] rightCols, SelectExp right)(Code)
Create an expression to join us to right.



createJoinToSuperTable
public static SelectExp createJoinToSuperTable(SelectExp root, JdbcField jdbcField)(Code)
Used to obtain a selectexp for a field. This will add a join to the supertable if not already added.



createJoinToSuperTable
public static SelectExp createJoinToSuperTable(SelectExp root, SelectExp joinFromExp, JdbcColumn[] lJoinColumns, JdbcField jdbcField)(Code)
Used to obtain a selectexp for a field. This will add a join to the supertable if not already added.



createJoinToSuperTable
public static SelectExp createJoinToSuperTable(SelectExp root, JdbcTable table)(Code)
Used to obtain a selectexp for a field. This will add a join to the supertable if not already added.



dump
public void dump(String indent)(Code)
Dump debugging info to System.out.



dumpJoinList
public static void dumpJoinList(SelectExp joinFromExp, String val)(Code)



dumpJoinListRec
public static void dumpJoinListRec(SelectExp joinFromExp, String indent)(Code)



findJoin
public Join findJoin(JdbcField jdbcField)(Code)
Search our join list for a join for the field. This is not recursive i.e. it only finds joins in our join list. Returns null if not found.
See Also:   SelectExp.findJoinRec(com.versant.core.jdbc.metadata.JdbcField)



findJoin
public Join findJoin(JdbcTable table, JdbcField jdbcField)(Code)
Find a join by table and refField.



findJoin
public Join findJoin(SelectExp se)(Code)
Search our join list for a join to the expression. This is not recursive i.e. it only finds joins in our join list. Returns null if not found.



findJoinRec
public Join findJoinRec(JdbcField jdbcField)(Code)
Recursively search our join list for a join for the field. Returns null if not found.
See Also:   SelectExp.findJoin(com.versant.core.jdbc.metadata.JdbcField)



findTable
public SelectExp findTable(JdbcTable t)(Code)
If our table is t then return this. Otherwise search our join list for a join for the table. This is not recursive i.e. it only finds tables in our join list. Returns null if not found.



findTableRecursive
public SelectExp findTableRecursive(JdbcTable t, JdbcField field)(Code)



findTableRecursive
public SelectExp findTableRecursive(JdbcTable t)(Code)



finishSelectList
protected void finishSelectList(CharBuf s, int start)(Code)
Check that the select list is valid.



getClone
public SqlExp getClone(SqlExp clone, Map cloneMap)(Code)



getLastJoin
public Join getLastJoin()(Code)



getOuterJoinMatchedExp
public SqlExp getOuterJoinMatchedExp()(Code)
Get an expression that is true if this join produces a fully populated row (i.e. all of the outer most pk columns are not null indicating that all outer joins were matched).



getOuterJoinNotMatchedExp
public SqlExp getOuterJoinNotMatchedExp()(Code)
Get an expression that is true if this join does not produce a fully populated row (i.e. one or more of the outer most pk columns are null indicating that an outer join was not matched).



getSelectListColumnCount
public int getSelectListColumnCount()(Code)
Count the number of columns in the select list and all joined to lists.



isJoinToManyTable
public boolean isJoinToManyTable()(Code)
Does this select contain a join to a many table that may produce multiple rows? This is used to decide on setting the distinct flag if this select is converterd into an outer join.



mergeJoinList
public static void mergeJoinList(Join j)(Code)



normalize
public SqlExp normalize(SqlDriver driver, SelectExp sel, boolean convertExists)(Code)
Normalize this node i.e. transform it into its simplist possible form. This will turn sub selects into joins and so on.



prependOrderByForColumns
public void prependOrderByForColumns(JdbcColumn[] columns)(Code)
Insert the columns at the start of the orderByList as ascending.



replaceSelectExpRef
public void replaceSelectExpRef(SelectExp old, SelectExp nw)(Code)
Replace any references to old with nw. This is used when redundant joins are removed.



setOuterRec
public void setOuterRec()(Code)
Set our outer flag and follow all our joins and make then outer as well.



toString
public String toString()(Code)



Methods inherited from com.versant.core.jdbc.sql.exp.LeafExp
public int createAlias(int index)(Code)(Java Doc)
public SqlExp createInstance()(Code)(Java Doc)
public SqlExp normalize(SqlDriver driver, SelectExp sel, boolean convertExists)(Code)(Java Doc)

Fields inherited from com.versant.core.jdbc.sql.exp.SqlExp
final public static int NO(Code)(Java Doc)
final public static int YES(Code)(Java Doc)
final public static int YES_DISTINCT(Code)(Java Doc)
final public static int YES_DISTINCT_NOT(Code)(Java Doc)
public SqlExp childList(Code)(Java Doc)
public SqlExp next(Code)(Java Doc)

Methods inherited from com.versant.core.jdbc.sql.exp.SqlExp
public void append(SqlExp extra)(Code)(Java Doc)
final public void appendSQL(SqlDriver driver, CharBuf s, SqlExp leftSibling)(Code)(Java Doc)
protected void appendSQLImp(SqlDriver driver, CharBuf s, SqlExp leftSibling)(Code)(Java Doc)
public static SqlExp appendWithAnd(SqlExp base, SqlExp e)(Code)(Java Doc)
public int createAlias(int index)(Code)(Java Doc)
public static SqlExp createBinaryOpExp(SqlExp left, int op, SqlExp right)(Code)(Java Doc)
public static SqlExp createClone(SqlExp sqlExp)(Code)(Java Doc)
public static SqlExp createClone(SqlExp inst, Map cloneMap)(Code)(Java Doc)
public SqlExp createInstance()(Code)(Java Doc)
public void dump(String indent)(Code)(Java Doc)
public void dumpList(String indent)(Code)(Java Doc)
public int getClassIndex()(Code)(Java Doc)
public SqlExp getClone(SqlExp clone, Map cloneMap)(Code)(Java Doc)
public int getConvertToJoin()(Code)(Java Doc)
public int getFirstCharIndex()(Code)(Java Doc)
public int getJavaTypeCode()(Code)(Java Doc)
public int getJdbcType()(Code)(Java Doc)
final public int getLastCharIndex()(Code)(Java Doc)
final public int getPreFirstCharIndex()(Code)(Java Doc)
public SelectExp getSingleSelectExp(SelectExp exclude)(Code)(Java Doc)
public boolean isNegative()(Code)(Java Doc)
public SqlExp normalize(SqlDriver driver, SelectExp sel, boolean convertExists)(Code)(Java Doc)
public void replaceSelectExpRef(SelectExp old, SelectExp nw)(Code)(Java Doc)
public boolean requiresParensInAnd()(Code)(Java Doc)
public boolean requiresParensInMultiply()(Code)(Java Doc)
public void setOuter(boolean on)(Code)(Java Doc)
public String toString()(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.