Java Doc for FxStatement.java in  » J2EE » fleXive » com » flexive » sqlParser » 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 » J2EE » fleXive » com.flexive.sqlParser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.flexive.sqlParser.FxStatement

FxStatement
public class FxStatement (Code)
Statement.
author:
   Gregor Schober (gregor.schober@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Inner Class :public static enum Type


Constructor Summary
protected  FxStatement()
    

Method Summary
protected  voidaddFilter(Filter f)
    
public  voidaddOrderByValue(OrderByValue vi)
     Adds a new order by condition.
protected  voidaddSelectedValue(Value vi, String alias)
     Add a Value to the selected elements.
protected  voidaddTable(Table table)
    
protected  voidcleanup()
     Removes empty braces and handles conditions that are always false or true.
protected  BraceendSubBrace()
    
public  long[]getBriefcaseFilter()
     Returns a empty array if the filter is not set, or the id's of all briefcases to search in.
protected  StringgetCacheKey()
     Compute a cache key for the statement.
public  StringgetContentTypeFilter()
     Returns the contentname to filter by, or null if this filter option is not set.
protected  BracegetCurrentBrace()
    
public  FiltergetFilter(Filter.TYPE t)
     Returns the desired filter, or null if the filter was not specified and has no default value.
public  booleangetIgnoreCase()
    
public  intgetMaxResultRows()
     Gets the maximum rows returned by the search.
protected  intgetNewBraceElementId()
     Generates a new statement scope unique brace id.
public  List<OrderByValue>getOrderByValues()
     Returns the sort order elements.
public  intgetParserExecutionTime()
     Returns the execution time needed by the parser in ms.
public  BracegetRootBrace()
     Returns the root brace.
public  SelectedValuegetSelectedValueByAlias(String alias)
     Returns the selected value matching the given alias, or null if no match can be found.
public  List<SelectedValue>getSelectedValues()
     Returns the selected values in the correct order.
public  TablegetTableByAlias(String alias)
     Returns a table used by the statement by its alias.
public  TablegetTableByType(Table.TYPE type)
    
public  Table[]getTables()
     Returns all tables that were specified in the 'from' section of the statement.
public  TypegetType()
     Returns the statements type.
public  VersionFiltergetVersionFilter()
    
public  booleanhasContentTypeFilter()
     Returns true if the content type filter is set.
public  booleanhasVersionFilter()
    
public  booleanisDistinct()
     Returns if the statements resultset is distinct.
public static  FxStatementparseSql(String query)
     Parses a statement.
public  StringprintDebug()
     Generates a debug string.
protected  voidprintDebug(StringBuffer sb, Brace br)
     Generates a debug string for the statement.
protected  voidsetBriefcaseFilter(long[] bf)
    
protected  voidsetContentTypeFilter(String contentName)
    
protected  voidsetDistinct(boolean value)
     Sets the distinct condition of the statement.
protected  voidsetIgnoreCase(boolean ignoreCase)
    
protected  voidsetMaxResultRows(int maxResultRows)
     Sets the maximum rows returned by the search.
protected  voidsetParserExecutionTime(int ms)
    
public  voidsetSelectedValues(ArrayList<SelectedValue> values)
     Overrides the selected values in the given order.
public  voidsetVersionFilter(VersionFilter filter)
    
protected  BracestartSubBrace()
    


Constructor Detail
FxStatement
protected FxStatement()(Code)




Method Detail
addFilter
protected void addFilter(Filter f)(Code)



addOrderByValue
public void addOrderByValue(OrderByValue vi) throws SqlParserException(Code)
Adds a new order by condition.
Parameters:
  vi - the order by value (column)
throws:
  com.flexive.sqlParser.SqlParserException - if the column cannot be used for ordering because it is not selected



addSelectedValue
protected void addSelectedValue(Value vi, String alias)(Code)
Add a Value to the selected elements.
Parameters:
  vi - the element
Parameters:
  alias - the alias



addTable
protected void addTable(Table table)(Code)



cleanup
protected void cleanup() throws SqlParserException(Code)
Removes empty braces and handles conditions that are always false or true. Also checks if all aliases are defined.
throws:
  SqlParserException - if the function fails



endSubBrace
protected Brace endSubBrace() throws SqlParserException(Code)



getBriefcaseFilter
public long[] getBriefcaseFilter()(Code)
Returns a empty array if the filter is not set, or the id's of all briefcases to search in. a empty array if the filter is not set, or the id's of all briefcases to search in.



getCacheKey
protected String getCacheKey() throws SqlParserException(Code)
Compute a cache key for the statement.

Statements with the same cache key will produce the same resultset. the cacheKey.
throws:
  SqlParserException - if the cache key could not be computed




getContentTypeFilter
public String getContentTypeFilter()(Code)
Returns the contentname to filter by, or null if this filter option is not set. the contentname or null



getCurrentBrace
protected Brace getCurrentBrace()(Code)



getFilter
public Filter getFilter(Filter.TYPE t)(Code)
Returns the desired filter, or null if the filter was not specified and has no default value.
Parameters:
  t - the filter to get the filter



getIgnoreCase
public boolean getIgnoreCase()(Code)



getMaxResultRows
public int getMaxResultRows()(Code)
Gets the maximum rows returned by the search. the maximum rows returned by the search



getNewBraceElementId
protected int getNewBraceElementId()(Code)
Generates a new statement scope unique brace id. a new brace id



getOrderByValues
public List<OrderByValue> getOrderByValues()(Code)
Returns the sort order elements. the sort order values



getParserExecutionTime
public int getParserExecutionTime()(Code)
Returns the execution time needed by the parser in ms. the execution time needed by the parser in ms



getRootBrace
public Brace getRootBrace()(Code)
Returns the root brace.

The root brace will be null if the getType is TYPE.ALL or TYPE.EMPTY the root brace




getSelectedValueByAlias
public SelectedValue getSelectedValueByAlias(String alias)(Code)
Returns the selected value matching the given alias, or null if no match can be found.

If a alias is used more than one time the first match will be returned.
Parameters:
  alias - the alias to look for the matching selected value, or null




getSelectedValues
public List<SelectedValue> getSelectedValues()(Code)
Returns the selected values in the correct order. the selected values



getTableByAlias
public Table getTableByAlias(String alias)(Code)
Returns a table used by the statement by its alias.
Parameters:
  alias - the alias to look for a table used by the statement by its alias



getTableByType
public Table getTableByType(Table.TYPE type)(Code)



getTables
public Table[] getTables()(Code)
Returns all tables that were specified in the 'from' section of the statement. all tables



getType
public Type getType()(Code)
Returns the statements type.

TYPE.FILTER: there are conditions
TYPE.EMPTY: the statement will not deliver any results
TYPE.ALL: the statements will deliver all data from the selected sources (no filter set) the statements type




getVersionFilter
public VersionFilter getVersionFilter()(Code)



hasContentTypeFilter
public boolean hasContentTypeFilter()(Code)
Returns true if the content type filter is set. true if the content type filter is set



hasVersionFilter
public boolean hasVersionFilter()(Code)



isDistinct
public boolean isDistinct()(Code)
Returns if the statements resultset is distinct. true if the statements resultset is distinct



parseSql
public static FxStatement parseSql(String query) throws SqlParserException(Code)
Parses a statement.
Parameters:
  query - the query to process the statement
throws:
  SqlParserException - ifthe function fails



printDebug
public String printDebug() throws FxSqlSearchException(Code)
Generates a debug string. a debug string of the statement
throws:
  com.flexive.shared.exceptions.FxSqlSearchException - if the function failed



printDebug
protected void printDebug(StringBuffer sb, Brace br)(Code)
Generates a debug string for the statement.
Parameters:
  sb - the StringBuffer to write to
Parameters:
  br - the current bracer (recursion)



setBriefcaseFilter
protected void setBriefcaseFilter(long[] bf)(Code)



setContentTypeFilter
protected void setContentTypeFilter(String contentName)(Code)
Sets the contentname to filter by, may be null to indicate that the filter is not set
Parameters:
  contentName - the content name



setDistinct
protected void setDistinct(boolean value)(Code)
Sets the distinct condition of the statement.
Parameters:
  value - the condition



setIgnoreCase
protected void setIgnoreCase(boolean ignoreCase)(Code)



setMaxResultRows
protected void setMaxResultRows(int maxResultRows)(Code)
Sets the maximum rows returned by the search.
Parameters:
  maxResultRows - the maximum rows returned by the search



setParserExecutionTime
protected void setParserExecutionTime(int ms)(Code)



setSelectedValues
public void setSelectedValues(ArrayList<SelectedValue> values)(Code)
Overrides the selected values in the given order.
Parameters:
  values - the new list



setVersionFilter
public void setVersionFilter(VersionFilter filter)(Code)



startSubBrace
protected Brace startSubBrace() throws SqlParserException(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.