Java Doc for SqlExp.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

All known Subclasses:   com.versant.core.jdbc.sql.exp.InExp,  com.versant.core.jdbc.sql.exp.MultiplyExp,  com.versant.core.jdbc.sql.exp.GroupByThisExp,  com.versant.core.jdbc.sql.exp.AndExp,  com.versant.core.jdbc.sql.exp.AggregateCountStarExp,  com.versant.core.jdbc.sql.exp.InlineSqlExp,  com.versant.core.jdbc.sql.exp.BetweenExp,  com.versant.core.jdbc.sql.exp.UnaryExp,  com.versant.core.jdbc.sql.exp.OrExp,  com.versant.core.jdbc.sql.exp.AddExp,  com.versant.core.jdbc.sql.exp.LeafExp,  com.versant.core.jdbc.sql.exp.BinaryExp,
SqlExp
public class SqlExp (Code)
An expression in an SQL query.


Field Summary
final public static  intNO
     Do not convert this expression into a join.
final public static  intYES
     Convert into a join.
final public static  intYES_DISTINCT
     Convert into a join and select distinct.
final public static  intYES_DISTINCT_NOT
     Convert into an outer join with is null check and select distinct.
public  SqlExpchildList
     Linked list of children formed using their next fields.
public  SqlExpnext
     This makes it easy to form linked lists of expressions.

Constructor Summary
public  SqlExp()
    
public  SqlExp(SqlExp childList)
    

Method Summary
public  voidappend(SqlExp extra)
     Add a list of expressions to the end of our childList.
final public  voidappendSQL(SqlDriver driver, CharBuf s, SqlExp leftSibling)
     Append SQL for this node to s.
protected  voidappendSQLImp(SqlDriver driver, CharBuf s, SqlExp leftSibling)
     Append SQL for this node to s.
public static  SqlExpappendWithAnd(SqlExp base, SqlExp e)
     Append e to base using an AndExp.
public  intcreateAlias(int index)
     Create an aliases for any subtables we may have.
public static  SqlExpcreateBinaryOpExp(SqlExp left, int op, SqlExp right)
     Create an expression comparing the left and right exp with an operator.
public static  SqlExpcreateClone(SqlExp sqlExp)
     Use this to clone a SqlExp tree.
public static  SqlExpcreateClone(SqlExp inst, Map cloneMap)
     This is a util method that decides if a instance should be cloned.
public  SqlExpcreateInstance()
    
public  voiddump(String indent)
     Dump debugging info to System.out.
public  voiddumpList(String indent)
     Dump us and our list to System.out.
public  intgetClassIndex()
    
public  SqlExpgetClone(SqlExp clone, Map cloneMap)
     Clone the current instance.
public  intgetConvertToJoin()
    
public  intgetFirstCharIndex()
     Get the index of first character of the 'is null' parameter replacement span for this expression.
public  intgetJavaTypeCode()
    
public  intgetJdbcType()
    
final public  intgetLastCharIndex()
     Get the index of the character after the last character of the 'is null' parameter replacement span for this expression.
final public  intgetPreFirstCharIndex()
     Get the index of first character of the this expression in the output buffer.
public  SelectExpgetSingleSelectExp(SelectExp exclude)
     If this expression involves a single table (other than exclude) only then return the SelectExp for the table (e.g.
public  booleanisNegative()
    
public  SqlExpnormalize(SqlDriver driver, SelectExp sel, boolean convertExists)
     Normalize this node i.e.
public  voidreplaceSelectExpRef(SelectExp old, SelectExp nw)
     Replace any references to old with nw.
public  booleanrequiresParensInAnd()
    
public  booleanrequiresParensInMultiply()
    
public  voidsetOuter(boolean on)
     Make us an outer join or not.
public  StringtoString()
    

Field Detail
NO
final public static int NO(Code)
Do not convert this expression into a join. *



YES
final public static int YES(Code)
Convert into a join. *



YES_DISTINCT
final public static int YES_DISTINCT(Code)
Convert into a join and select distinct. *



YES_DISTINCT_NOT
final public static int YES_DISTINCT_NOT(Code)
Convert into an outer join with is null check and select distinct. *



childList
public SqlExp childList(Code)
Linked list of children formed using their next fields.



next
public SqlExp next(Code)
This makes it easy to form linked lists of expressions. This is faster and uses less memory than arrays of expressions.




Constructor Detail
SqlExp
public SqlExp()(Code)



SqlExp
public SqlExp(SqlExp childList)(Code)




Method Detail
append
public void append(SqlExp extra)(Code)
Add a list of expressions to the end of our childList.



appendSQL
final public void appendSQL(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 - The SqlExp to the left of us or null if none



appendSQLImp
protected void appendSQLImp(SqlDriver driver, CharBuf s, SqlExp leftSibling)(Code)
Append SQL for this node to s. This is the method that subclasses should override.
Parameters:
  driver - The driver being used
Parameters:
  s - Append the SQL here
Parameters:
  leftSibling - The SqlExp to the left of us or null if none



appendWithAnd
public static SqlExp appendWithAnd(SqlExp base, SqlExp e)(Code)
Append e to base using an AndExp. If base is already an AndExp then e is simply appended. If base is null then e becomes base. Otherwise base becomes a a new AndExp created from the old base and e. New value for base



createAlias
public int createAlias(int index)(Code)
Create an aliases for any subtables we may have.



createBinaryOpExp
public static SqlExp createBinaryOpExp(SqlExp left, int op, SqlExp right)(Code)
Create an expression comparing the left and right exp with an operator. Only == and != really make sense. If left and right are lists then comparing matching exp's joined together in an 'and' list.



createClone
public static SqlExp createClone(SqlExp sqlExp)(Code)
Use this to clone a SqlExp tree.
Parameters:
  sqlExp -



createClone
public static SqlExp createClone(SqlExp inst, Map cloneMap)(Code)
This is a util method that decides if a instance should be cloned. If the instance was already cloned then the already cloned instance is returned.
Parameters:
  inst -
Parameters:
  cloneMap - A cloned instance.



createInstance
public SqlExp createInstance()(Code)



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



dumpList
public void dumpList(String indent)(Code)
Dump us and our list to System.out.



getClassIndex
public int getClassIndex()(Code)
What is the class index for this expression (-1 if unknown)?
See Also:   ParamNode



getClone
public SqlExp getClone(SqlExp clone, Map cloneMap)(Code)
Clone the current instance. This method is called by subclassed to create a clone of its superclass.
Parameters:
  clone - The instance it must set the cloned values on.
Parameters:
  cloneMap - This map is used to avoid creating multiple clones for a singel instance. The update SqlExp



getConvertToJoin
public int getConvertToJoin()(Code)
Can this expression be removed and its child be converted into a join?
See Also:   ExistsExp
See Also:   SqlExp.NO
See Also:   SqlExp.YES
See Also:   SqlExp.YES_DISTINCT
See Also:   SqlExp.YES_DISTINCT_NOT



getFirstCharIndex
public int getFirstCharIndex()(Code)
Get the index of first character of the 'is null' parameter replacement span for this expression.



getJavaTypeCode
public int getJavaTypeCode()(Code)
What is the java type code of this expression (0 if unknown)?



getJdbcType
public int getJdbcType()(Code)
What is the JDBC type of this expression (0 if unknown)?



getLastCharIndex
final public int getLastCharIndex()(Code)
Get the index of the character after the last character of the 'is null' parameter replacement span for this expression.



getPreFirstCharIndex
final public int getPreFirstCharIndex()(Code)
Get the index of first character of the this expression in the output buffer. This is used when the whole expression needs to be replaced.



getSingleSelectExp
public SelectExp getSingleSelectExp(SelectExp exclude)(Code)
If this expression involves a single table (other than exclude) only then return the SelectExp for the table (e.g. a.col1 == 10 returns a, a.col1 = b.col2 returns null, a.col1 = b.col2 with exclude = b returns a). This is used to detect expressions that can be moved into the ON list for the join to the table involved.



isNegative
public boolean isNegative()(Code)
Is this a negative expression for the purposes of replacing parameter values with 'is null' (false) or 'is not null' (true)?



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. Return expression to replace us with or null if no change.



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



requiresParensInAnd
public boolean requiresParensInAnd()(Code)
If this expression is added to an AndExp should it be enclosed in parenthesis?



requiresParensInMultiply
public boolean requiresParensInMultiply()(Code)
If this expression is added to an MultiplyExp should it be enclosed in parenthesis?



setOuter
public void setOuter(boolean on)(Code)
Make us an outer join or not. This is a NOP except for JoinExp and AndJoinExp.
See Also:   JoinExp
See Also:   AndJoinExp



toString
public String toString()(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.