Java Doc for AbstractEsqlQuery.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » language » markup » xsp » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.components.language.markup.xsp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.components.language.markup.xsp.AbstractEsqlQuery

All known Subclasses:   org.apache.cocoon.components.language.markup.xsp.PostgresOldEsqlQuery,  org.apache.cocoon.components.language.markup.xsp.SybaseEsqlQuery,  org.apache.cocoon.components.language.markup.xsp.MysqlEsqlQuery,  org.apache.cocoon.components.language.markup.xsp.JdbcEsqlQuery,  org.apache.cocoon.components.language.markup.xsp.OracleEsqlQuery,  org.apache.cocoon.components.language.markup.xsp.PostgresEsqlQuery,  org.apache.cocoon.components.language.markup.xsp.PervasiveEsqlQuery,
AbstractEsqlQuery
abstract public class AbstractEsqlQuery extends AbstractLogEnabled (Code)
This is base class for all EsqlQueries
author:
   Torsten Curdt
version:
   CVS $Id: AbstractEsqlQuery.java 433543 2006-08-22 06:22:54Z crossley $

Inner Class :final static class EsqlGroup


Constructor Summary
protected  AbstractEsqlQuery(Connection connection, String query)
    
protected  AbstractEsqlQuery(ResultSet resultSet)
    

Method Summary
public  voidcleanUp()
     Clean up all database resources used by the query.
final public  voiddecGroupLevel()
    
final public  booleanexecute(int resultSetFromObject)
    
final public  booleanexecute()
    
final public  booleanexecuteQuery()
    
final public  CallableStatementgetCallableStatement()
    
final public  ConnectiongetConnection()
    
final public  intgetCurrentRow()
    
final public  intgetMaxRows()
    
final public  booleangetMoreResults()
    
final public  PreparedStatementgetPreparedStatement()
    
final public  intgetQueryResultsCount()
    
public  StringgetQueryString()
     Return the query string ("select * from bla") NOTE: Might want to be overridden by indiviual EsqlQuery implementations e.g.
public  voidgetResultRows()
     Move to the first row.
final public  ResultSetgetResultSet()
    
final public  ResultSetMetaDatagetResultSetMetaData()
    
public  intgetRowCount()
     Gets the total number of rows of a the query WITHOUT the limits of skip/max rows.
final public  intgetSkipRows()
    
final public  intgetUpdateCount()
    
final public  intgetUpdateResultsCount()
    
final public  booleangroupLevelExists()
    
final public  booleanhasGroupingVarChanged()
    
final public  booleanhasResultSet()
    
final public  voidincGroupLevel()
    
final public  booleankeepGoing()
    
abstract public  AbstractEsqlQuerynewInstance(ResultSet resultSet)
    
final public  booleannextRow()
    
public  CallableStatementprepareCall()
    
public  PreparedStatementprepareStatement()
    
final public  voidsetGroupingVar(String key)
    
final public  voidsetKeepGoing(boolean still)
    
final public  voidsetMaxRows(int i)
    
final protected  voidsetPosition(int p)
    
final protected  PreparedStatementsetPreparedStatement(PreparedStatement ps)
    
final public  voidsetSkipRows(int i)
    


Constructor Detail
AbstractEsqlQuery
protected AbstractEsqlQuery(Connection connection, String query)(Code)
Constructor
Parameters:
  connection -
Parameters:
  query - - The SQL query string



AbstractEsqlQuery
protected AbstractEsqlQuery(ResultSet resultSet)(Code)
Only newInstance may use this contructor
Parameters:
  resultSet -




Method Detail
cleanUp
public void cleanUp()(Code)
Clean up all database resources used by the query. In particular, close result sets and statements.



decGroupLevel
final public void decGroupLevel()(Code)



execute
final public boolean execute(int resultSetFromObject) throws SQLException(Code)



execute
final public boolean execute() throws SQLException(Code)



executeQuery
final public boolean executeQuery() throws SQLException(Code)



getCallableStatement
final public CallableStatement getCallableStatement()(Code)



getConnection
final public Connection getConnection()(Code)



getCurrentRow
final public int getCurrentRow()(Code)



getMaxRows
final public int getMaxRows()(Code)



getMoreResults
final public boolean getMoreResults() throws SQLException(Code)
Try to get the next ResultSet whether there is one or not
throws:
  SQLException -



getPreparedStatement
final public PreparedStatement getPreparedStatement()(Code)



getQueryResultsCount
final public int getQueryResultsCount()(Code)
Returns the number of query results



getQueryString
public String getQueryString() throws SQLException(Code)
Return the query string ("select * from bla") NOTE: Might want to be overridden by indiviual EsqlQuery implementations e.g. for database specific LIMIT features. Be aware that there a two different limit approaches:
 retrieve                   query
 time                       time
 +---------+                ...........
 |JDBC     |                :         :
 |ResultSet|                :         :
 |.........|-+              :_________:_
 |         | | skip/max+1   |JDBC     | | skip/max+1
 |         | | window       |ResultSet| | window
 |.........| |              |_________| |
 |         |-+              :         :_|
 |         |                :         :
 +---------+                :.........:
 
With the "retrieve time" limit the JDBC ResultSet includes ALL of the rows of the query. With the "query time" limit only a small window of rows are in the actuall JDBC ResultSet. In order to know whether there are more rows available (without an additional query) we need to have at least one more row in the JDBC ResultSet. So we ask for getMaxRows()+1
throws:
  SQLException -



getResultRows
public void getResultRows() throws SQLException(Code)
Move to the first row. NOTE: Might want to be overridden by indiviual EsqlQuery implementations
throws:
  SQLException -



getResultSet
final public ResultSet getResultSet()(Code)



getResultSetMetaData
final public ResultSetMetaData getResultSetMetaData()(Code)



getRowCount
public int getRowCount() throws SQLException(Code)
Gets the total number of rows of a the query WITHOUT the limits of skip/max rows. NOTE: Might want to be overridden by indiviual EsqlQuery implementations total number of rows
throws:
  SQLException -



getSkipRows
final public int getSkipRows()(Code)



getUpdateCount
final public int getUpdateCount()(Code)
Returns the how many rows where updated on last update



getUpdateResultsCount
final public int getUpdateResultsCount()(Code)
Returns the number of update results



groupLevelExists
final public boolean groupLevelExists()(Code)



hasGroupingVarChanged
final public boolean hasGroupingVarChanged() throws SQLException(Code)



hasResultSet
final public boolean hasResultSet()(Code)



incGroupLevel
final public void incGroupLevel()(Code)



keepGoing
final public boolean keepGoing()(Code)



newInstance
abstract public AbstractEsqlQuery newInstance(ResultSet resultSet)(Code)
Create a EsqlQuery of the same type
Parameters:
  resultSet -



nextRow
final public boolean nextRow() throws SQLException(Code)



prepareCall
public CallableStatement prepareCall() throws SQLException(Code)
NOTE: Might want to be overridden by indiviual EsqlQuery implementations
throws:
  SQLException -



prepareStatement
public PreparedStatement prepareStatement() throws SQLException(Code)
NOTE: Might want to be overridden by indiviual EsqlQuery implementations
throws:
  SQLException -



setGroupingVar
final public void setGroupingVar(String key) throws SQLException(Code)



setKeepGoing
final public void setKeepGoing(boolean still)(Code)



setMaxRows
final public void setMaxRows(int i)(Code)



setPosition
final protected void setPosition(int p)(Code)



setPreparedStatement
final protected PreparedStatement setPreparedStatement(PreparedStatement ps)(Code)



setSkipRows
final public void setSkipRows(int i)(Code)



w__ww_.__j_a__va_2__s.___c__o_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.