Java Doc for Query.java in  » Database-ORM » Torque » org » apache » torque » util » 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 » Torque » org.apache.torque.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.torque.util.Query

Query
public class Query (Code)
Used to assemble an SQL SELECT query. Attributes exist for the sections of a SELECT: modifiers, columns, from clause, where clause, and order by clause. The various parts of the query are appended to buffers which only accept unique entries. This class is used primarily by BasePeer.
author:
   John D. McNally
author:
   Sam Joseph
author:
   Martin Poeschl
author:
   Thomas Fischer
version:
   $Id: Query.java 522044 2007-03-24 16:00:57Z tfischer $

Inner Class :public static class FromElement



Method Summary
public  UniqueListgetFromClause()
     Retrieve the from buffer in order to specify which tables are involved in this query.
public  UniqueListgetGroupByClause()
     Retrieve the group by columns buffer in order to specify which columns are used to group the results of the query.
public  StringgetHaving()
     Get the having clause.
public  StringgetLimit()
     Get the limit number.
public  StringgetOffset()
     Get the offset number.
public  UniqueListgetOrderByClause()
     Retrieve the order by columns buffer in order to specify which columns are used to sort the results of the query.
public  StringgetPostLimit()
     Get the Post limit String.
public  StringgetPreLimit()
     Get the Pre limit String.
public  StringgetRowcount()
     Get the rowcount number.
public  UniqueListgetSelectClause()
     Retrieve the columns buffer in order to specify which columns are returned in this query.
public  UniqueListgetSelectModifiers()
     Retrieve the modifier buffer in order to add modifiers to this query.
public  UniqueListgetWhereClause()
     Retrieve the where buffer in order to specify the selection criteria E.g.
public  booleanhasLimit()
     True if this query has a limit clause registered.
public  voidsetFromClause(UniqueList tables)
     Set the from clause.
public  voidsetHaving(String having)
     Set the having clause.
public  voidsetLimit(String limit)
     Set the limit number.
public  voidsetOffset(String offset)
     Set the offset number.
public  voidsetPostLimit(String postLimit)
     Set the Post limit String.
public  voidsetPreLimit(String preLimit)
     Get the Pre limit String.
public  voidsetRowcount(String rowcount)
     Set the rowcount number.
public  voidsetSelectClause(UniqueList columns)
     Set the columns.
public  voidsetSelectModifiers(UniqueList modifiers)
     Set the modifiers.
public  voidsetWhereClause(UniqueList where)
     Set the where clause.
public  StringtoString()
     Outputs the query statement.
public  StringBuffertoStringBuffer(StringBuffer stmt)
    



Method Detail
getFromClause
public UniqueList getFromClause()(Code)
Retrieve the from buffer in order to specify which tables are involved in this query. An UniqueList used to add tables involved in the query.



getGroupByClause
public UniqueList getGroupByClause()(Code)
Retrieve the group by columns buffer in order to specify which columns are used to group the results of the query. An UniqueList used to add columns to group on.



getHaving
public String getHaving()(Code)
Get the having clause. This is used to restrict which rows are returned based on some condition. A String that is the having clause.



getLimit
public String getLimit()(Code)
Get the limit number. This is used to limit the number of returned by a query in Postgres. A String with the limit.



getOffset
public String getOffset()(Code)
Get the offset number. This is used to set the row where the resultset starts. A String with the offset, or null if no offset is set.



getOrderByClause
public UniqueList getOrderByClause()(Code)
Retrieve the order by columns buffer in order to specify which columns are used to sort the results of the query. An UniqueList used to add columns to sort on.



getPostLimit
public String getPostLimit()(Code)
Get the Post limit String. Oracle and DB2 want to encapsulate a query into a subquery for limiting. A String with the preLimit.



getPreLimit
public String getPreLimit()(Code)
Get the Pre limit String. Oracle and DB2 want to encapsulate a query into a subquery for limiting. A String with the preLimit.



getRowcount
public String getRowcount()(Code)
Get the rowcount number. This is used to limit the number of returned by a query in Sybase and MS SQL/Server. A String with the row count.



getSelectClause
public UniqueList getSelectClause()(Code)
Retrieve the columns buffer in order to specify which columns are returned in this query. An UniqueList used to add columns to be selected.



getSelectModifiers
public UniqueList getSelectModifiers()(Code)
Retrieve the modifier buffer in order to add modifiers to this query. E.g. DISTINCT and ALL. An UniqueList used to add modifiers.



getWhereClause
public UniqueList getWhereClause()(Code)
Retrieve the where buffer in order to specify the selection criteria E.g. column_a=3. Expressions added to the buffer will be separated using AND. An UniqueList used to add selection criteria.



hasLimit
public boolean hasLimit()(Code)
True if this query has a limit clause registered. true if a limit clause exists.



setFromClause
public void setFromClause(UniqueList tables)(Code)
Set the from clause.
Parameters:
  tables - the tables



setHaving
public void setHaving(String having)(Code)
Set the having clause. This is used to restrict which rows are returned.
Parameters:
  having - A String.



setLimit
public void setLimit(String limit)(Code)
Set the limit number. This is used to limit the number of rows returned by a query.
Parameters:
  limit - A String.



setOffset
public void setOffset(String offset)(Code)
Set the offset number. This is used to set the row where the resultset starts.
Parameters:
  offset - A String.



setPostLimit
public void setPostLimit(String postLimit)(Code)
Set the Post limit String. Oracle and DB2 want to encapsulate a query into a subquery for limiting.
Parameters:
  postLimit - A String with the postLimit.



setPreLimit
public void setPreLimit(String preLimit)(Code)
Get the Pre limit String. Oracle and DB2 want to encapsulate a query into a subquery for limiting.
Parameters:
  preLimit - A String with the preLimit.



setRowcount
public void setRowcount(String rowcount)(Code)
Set the rowcount number. This is used to limit the number of rows returned by Sybase and MS SQL/Server.
Parameters:
  rowcount - A String.



setSelectClause
public void setSelectClause(UniqueList columns)(Code)
Set the columns.
Parameters:
  columns - columns list



setSelectModifiers
public void setSelectModifiers(UniqueList modifiers)(Code)
Set the modifiers. E.g. DISTINCT and ALL.
Parameters:
  modifiers - the modifiers



setWhereClause
public void setWhereClause(UniqueList where)(Code)
Set the where clause.
Parameters:
  where - where clause



toString
public String toString()(Code)
Outputs the query statement. A String with the query statement.



toStringBuffer
public StringBuffer toStringBuffer(StringBuffer stmt)(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.