org.apache.cocoon.components.language.markup.xsp
Class EsqlQuery

java.lang.Object
  |
  +--org.apache.cocoon.components.language.markup.xsp.EsqlQuery

public class EsqlQuery
extends java.lang.Object

This helper class takes care of contstructing queries and cursor positioning (paging) for all different kinds of databases based on the orginal esql.xsl

Version:
CVS $Id: EsqlQuery.java,v 1.11.2.6 2002/06/28 08:16:42 haul Exp $
Author:
Torsten Curdt

Constructor Summary
EsqlQuery(EsqlConnection connection, java.lang.String query)
           
EsqlQuery(java.sql.ResultSet aResultSet)
           
 
Method Summary
protected  void adjustCounts()
          update counters for result sets and update counts
 java.sql.Statement createStatement()
           
 boolean execute()
           
 boolean execute(boolean needsQuery)
          some brain dead DBMSs (Informix) don't like their callable statements to be 'execute'd but require 'executeQuery' instead.
 boolean execute(int resultSetFromObject)
           
 java.sql.CallableStatement getCallableStatement()
           
 int getCurrentRow()
           
 int getMaxRows()
           
 boolean getMoreResults()
          retrieve next result, check whether it is an result set or an update count.
 java.sql.PreparedStatement getPreparedStatement()
           
 java.lang.String getQueryString()
           
 int getResultCount()
           
 void getResultRows()
           
 java.sql.ResultSet getResultSet()
           
 java.sql.ResultSetMetaData getResultSetMetaData()
           
 int getSkipRows()
           
 java.sql.Statement getStatement()
           
 int getUpdateCount()
           
 int getUpdateCountCount()
           
 boolean groupLevelExists()
           
 void groupLevelMinusMinus()
           
 void groupLevelPlusPlus()
           
 boolean hasGroupingVarChanged()
           
 boolean hasResultSet()
           
 boolean keepGoing()
           
 boolean nextRow()
           
 java.sql.CallableStatement prepareCall()
           
 java.sql.PreparedStatement prepareStatement()
           
 int rowCount()
           
 void setGroupingVar(java.lang.String key)
           
 void setKeepGoing(boolean still)
           
 void setMaxRows(int i)
           
 void setSkipRows(int i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EsqlQuery

public EsqlQuery(EsqlConnection connection,
                 java.lang.String query)

EsqlQuery

public EsqlQuery(java.sql.ResultSet aResultSet)
Method Detail

getSkipRows

public int getSkipRows()

setSkipRows

public void setSkipRows(int i)

getMaxRows

public int getMaxRows()

setMaxRows

public void setMaxRows(int i)

getCurrentRow

public int getCurrentRow()

getQueryString

public java.lang.String getQueryString()

prepareStatement

public java.sql.PreparedStatement prepareStatement()
                                            throws java.sql.SQLException

prepareCall

public java.sql.CallableStatement prepareCall()
                                       throws java.sql.SQLException

getPreparedStatement

public java.sql.PreparedStatement getPreparedStatement()

getCallableStatement

public java.sql.CallableStatement getCallableStatement()

getResultSet

public java.sql.ResultSet getResultSet()

nextRow

public boolean nextRow()
                throws java.sql.SQLException

keepGoing

public boolean keepGoing()

setKeepGoing

public void setKeepGoing(boolean still)

groupLevelPlusPlus

public void groupLevelPlusPlus()

groupLevelMinusMinus

public void groupLevelMinusMinus()

groupLevelExists

public boolean groupLevelExists()

setGroupingVar

public void setGroupingVar(java.lang.String key)
                    throws java.sql.SQLException

hasGroupingVarChanged

public boolean hasGroupingVarChanged()
                              throws java.sql.SQLException

getResultSetMetaData

public java.sql.ResultSetMetaData getResultSetMetaData()

createStatement

public java.sql.Statement createStatement()
                                   throws java.sql.SQLException

getStatement

public java.sql.Statement getStatement()

getUpdateCount

public int getUpdateCount()
                   throws java.sql.SQLException

getUpdateCountCount

public int getUpdateCountCount()

getResultCount

public int getResultCount()

getMoreResults

public boolean getMoreResults()
                       throws java.sql.SQLException
retrieve next result, check whether it is an result set or an update count. Set instance vars accordingly and update counters.

adjustCounts

protected void adjustCounts()
                     throws java.sql.SQLException
update counters for result sets and update counts

execute

public boolean execute()
                throws java.sql.SQLException

execute

public boolean execute(int resultSetFromObject)
                throws java.sql.SQLException

execute

public boolean execute(boolean needsQuery)
                throws java.sql.SQLException
some brain dead DBMSs (Informix) don't like their callable statements to be 'execute'd but require 'executeQuery' instead.

hasResultSet

public boolean hasResultSet()

rowCount

public int rowCount()
             throws java.sql.SQLException

getResultRows

public void getResultRows()
                   throws java.sql.SQLException


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.