Java Doc for ComposedQuery.java in  » Web-Framework » makumba » org » makumba » list » engine » 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 » Web Framework » makumba » org.makumba.list.engine 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.makumba.list.engine.ComposedQuery

All known Subclasses:   org.makumba.list.engine.ComposedSubquery,  org.makumba.list.engine.Evaluator,
ComposedQuery
public class ComposedQuery (Code)
An OQL query composed from various elements found in script pages. It can be enriched when a new element is found. It has a prepared Qyuery correspondent in a makumba database It may be based on a super query.
author:
   Cristian Bogdan
version:
   $Id: ComposedQuery.java 2150 2007-11-22 17:16:18Z cristian_bogdan $

Inner Class :public static interface Evaluator

Field Summary
final public static  intFROM
    
final public static  intGROUPBY
    
final public static  intORDERBY
    
final public static  intVARFROM
    
final public static  intWHERE
    
 String[]derivedSections
    
static  Vectorempty
     A Vector containing and empty vector.
 StringfromAnalyzerOQL
    
 Vector<Integer>keyset
     The keyset defining the primary key for this query.
 Vector<String>keysetLabels
    
 VectorpreviousKeyset
    
 Hashtable<String, Integer>projectionExpr
    
 Vector<Object>projections
    
public  QueryProviderqep
    
 String[]sections
    
 Vector<ComposedSubquery>subqueries
    
 StringtypeAnalyzerOQL
    

Constructor Summary
public  ComposedQuery(String[] sections, String queryLanguage)
    

Method Summary
 IntegeraddProjection(String expr)
    
public  voidaddProjection(Object o)
     allows to directly set a projection.
protected  voidaddSubquery(ComposedSubquery q)
     Adds a subquery to this query.
public synchronized  voidanalyze()
    
 StringcheckExpr(String str)
     Checks the orderBy or groupBy expressions to see if they are already selected, if not adds a projection.
public  ObjectcheckExprSetOrNullable(String expr)
    
public  ObjectcheckLabelSetOrNullable(String referenceSequence)
    
 StringcheckProjection(String expr)
     Checks if a projection exists, and if not, adds it.
public  IntegercheckProjectionInteger(String expr)
     Checks if a projection exists, and if not, adds it.
public static  StringcolumnName(Integer n)
    
protected  StringcomputeQuery(String derivedSections, boolean typeAnalysisOnly)
    
public  Grouperexecute(QueryProvider qep, Map args, Evaluator v, int offset, int limit)
    
public  StringgetFromSection()
    
public  DataDefinitiongetLabelType(String s)
    
public  StringgetProjectionAt(int n)
    
public  DataDefinitiongetResultType()
    
public  voidinit()
     Initializes the object.
protected  voidinitKeysets()
     Initializes the keysets.
static  booleanisMakId(char c)
    
protected  voidprependFromToKeyset()
     Adds all keys from the FROM section to the keyset, and their labels to the keyLabels.

Field Detail
FROM
final public static int FROM(Code)
Standard index for the FROM query section



GROUPBY
final public static int GROUPBY(Code)
Standard index for the GROUPBY query section



ORDERBY
final public static int ORDERBY(Code)
Standard index for the ORDERBY query section



VARFROM
final public static int VARFROM(Code)
Standard index for the VARFROM query section



WHERE
final public static int WHERE(Code)
Standard index for the WHERE query section



derivedSections
String[] derivedSections(Code)
Derived section texts, made from the sections of this query and the sections of its superqueries



empty
static Vector empty(Code)
A Vector containing and empty vector. Used for empty keysets



fromAnalyzerOQL
String fromAnalyzerOQL(Code)



keyset
Vector<Integer> keyset(Code)
The keyset defining the primary key for this query. Normally the primary key is made of the keys declared in FROM, in this query and all the parent queries. Keys are kept as integers (indexes)



keysetLabels
Vector<String> keysetLabels(Code)
The labels of the keyset



previousKeyset
Vector previousKeyset(Code)
The keyset of all the parent queries



projectionExpr
Hashtable<String, Integer> projectionExpr(Code)
The expression associated to each projection



projections
Vector<Object> projections(Code)
The projections made in this query



qep
public QueryProvider qep(Code)



sections
String[] sections(Code)
Section texts, encoded with the standard indexes



subqueries
Vector<ComposedSubquery> subqueries(Code)
The subqueries of this query



typeAnalyzerOQL
String typeAnalyzerOQL(Code)




Constructor Detail
ComposedQuery
public ComposedQuery(String[] sections, String queryLanguage)(Code)
Default constructor
Parameters:
  sections -
Parameters:
  usesHQL -




Method Detail
addProjection
Integer addProjection(String expr)(Code)
Adds a projection with the given expression
Parameters:
  expr - the expression to add The index at which the expression was added



addProjection
public void addProjection(Object o)(Code)
allows to directly set a projection. Used for totalCount in QueryTag.doAnalyzedStartTag(org.makumba.analyser.PageCache) to compose a query with 'count(*)' as the only projection.



addSubquery
protected void addSubquery(ComposedSubquery q)(Code)
Adds a subquery to this query. Makes it aware that it has subqueries at all. Makes it be able to announce its subqueries about changes (this will be needed when unique=true will be possible)
Parameters:
  q - the subquery



analyze
public synchronized void analyze()(Code)



checkExpr
String checkExpr(String str)(Code)
Checks the orderBy or groupBy expressions to see if they are already selected, if not adds a projection. Only group by and order by labels.
Parameters:
  str - an orderBy or groupBy expression The checked expression, transformed according to the projections



checkExprSetOrNullable
public Object checkExprSetOrNullable(String expr)(Code)
Checks if an expression is valid, nullable or set
Parameters:
  expr - the expression The path to the null pointer (if the object is nullable), null otherwise



checkLabelSetOrNullable
public Object checkLabelSetOrNullable(String referenceSequence)(Code)
Checks if an id is nullable, and if so, return the path to the null pointer
Parameters:
  referenceSequence - a sequence like field1.field2.field3 The path to the null pointer (if the object is nullable), null otherwise



checkProjection
String checkProjection(String expr)(Code)
Checks if a projection exists, and if not, adds it.
Parameters:
  expr - the expression to add The column name of the projection



checkProjectionInteger
public Integer checkProjectionInteger(String expr)(Code)
Checks if a projection exists, and if not, adds it.
Parameters:
  expr - the expression to add The index of the added projection



columnName
public static String columnName(Integer n)(Code)
Gets the name of a column indicated by index
Parameters:
  n - the index of the column A String containing the name of the column, of the kind "colN"



computeQuery
protected String computeQuery(String derivedSections, boolean typeAnalysisOnly)(Code)
Computes the query from its sections
Parameters:
  derivedSections - the sections of this query
Parameters:
  typeAnalysisOnly - indicates whether this is only a type analysis The computed OQL query



execute
public Grouper execute(QueryProvider qep, Map args, Evaluator v, int offset, int limit) throws LogicException(Code)
Executes the contained query in the given database
Parameters:
  qep - the database where the query should be ran
Parameters:
  args - the arguments we may need during the execution
Parameters:
  v - the evaluator evaluating the expressions
Parameters:
  offset - at which iteration this query should start
Parameters:
  limit - how many times should this query be ran
throws:
  LogicException -



getFromSection
public String getFromSection()(Code)
Gets the FROM section A String containing the FROM section of the query



getLabelType
public DataDefinition getLabelType(String s)(Code)
Gets the type of a given label
Parameters:
  s - the name of the label A DataDefinition corresponding to the type of the label



getProjectionAt
public String getProjectionAt(int n)(Code)
Gets a given projection
Parameters:
  n - the index of the projection A String containing the projection



getResultType
public DataDefinition getResultType()(Code)
Gets the type of the result The DataDefinition corresponding to the type of the result



init
public void init()(Code)
Initializes the object. This is a template method



initKeysets
protected void initKeysets()(Code)
Initializes the keysets. previousKeyset is "empty"



isMakId
static boolean isMakId(char c)(Code)
Checks if a character can be part of a makumba identifier
Parameters:
  c - the character to check true if the character can be part of a makumba identifier, false otherwise



prependFromToKeyset
protected void prependFromToKeyset()(Code)
Adds all keys from the FROM section to the keyset, and their labels to the keyLabels. They are all added as projections (this has to change)



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.