Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.mysql.jdbc.jdbc2.optional
Class PreparedStatementWrapper  view PreparedStatementWrapper download PreparedStatementWrapper.java

java.lang.Object
  extended bycom.mysql.jdbc.jdbc2.optional.WrapperBase
      extended bycom.mysql.jdbc.jdbc2.optional.StatementWrapper
          extended bycom.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper
All Implemented Interfaces:
java.sql.PreparedStatement, java.sql.Statement

class PreparedStatementWrapper
extends StatementWrapper
implements java.sql.PreparedStatement

Wraps prepared statements so that errors can be reported correctly to ConnectionEventListeners.

Version:
$Id: PreparedStatementWrapper.java,v 1.1.2.4 2004/08/09 22:15:12 mmatthew Exp $

Field Summary
protected  MysqlPooledConnection pooledConnection
           
protected  java.sql.Statement wrappedStmt
           
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Constructor Summary
(package private) PreparedStatementWrapper(MysqlPooledConnection conn, java.sql.PreparedStatement toWrap)
           
 
Method Summary
 void addBatch()
          This method adds a set of parameters to the batch for JDBC 2.0.
 void addBatch(java.lang.String sql)
          This method adds a SQL statement to a SQL batch.
 void cancel()
          This method cancels an outstanding statement, if the database supports that operation.
protected  void checkAndFireConnectionError(java.sql.SQLException sqlEx)
          Fires connection error event if required, before re-throwing exception
 void clearBatch()
          This method clears out any SQL statements that have been populated in the current batch.
 void clearParameters()
          This method clears all of the input parameter that have been set on this statement.
 void clearWarnings()
          This method clears any SQL warnings that have been attached to this statement.
 void close()
          This method closes the statement and frees any associated resources.
 boolean execute()
          This method executes a prepared SQL query.
 boolean execute(java.lang.String sql)
          This method executes an arbitrary SQL statement of any time.
 boolean execute(java.lang.String sql, int autoGeneratedKeys)
           
 boolean execute(java.lang.String sql, int[] columnIndexes)
           
 boolean execute(java.lang.String sql, java.lang.String[] columnNames)
           
 int[] executeBatch()
          This method executes the SQL batch and returns an array of update counts - one for each SQL statement in the batch - ordered in the same order the statements were added to the batch.
 java.sql.ResultSet executeQuery()
          This method executes a prepared SQL query and returns its ResultSet.
 java.sql.ResultSet executeQuery(java.lang.String sql)
          This method executes the specified SQL SELECT statement and returns a (possibly empty) ResultSet with the results of the query.
 int executeUpdate()
          This method executes an SQL INSERT, UPDATE or DELETE statement.
 int executeUpdate(java.lang.String sql)
          This method executes the specified SQL INSERT, UPDATE, or DELETE statement and returns the number of rows affected, which may be 0.
 int executeUpdate(java.lang.String sql, int autoGeneratedKeys)
           
 int executeUpdate(java.lang.String sql, int[] columnIndexes)
           
 int executeUpdate(java.lang.String sql, java.lang.String[] columnNames)
           
 java.sql.Connection getConnection()
          This method returns the Connection instance that was used to create this object.
 int getFetchDirection()
          This method returns the current direction that the driver thinks the result set will be accessed int.
 int getFetchSize()
          This method returns the number of rows the driver believes should be fetched from the database at a time.
 java.sql.ResultSet getGeneratedKeys()
           
 int getMaxFieldSize()
          This method returns the maximum length of any column value in bytes.
 int getMaxRows()
          This method returns the maximum possible number of rows in a result set.
 java.sql.ResultSetMetaData getMetaData()
          This method returns meta data for the result set from this statement.
 boolean getMoreResults()
          This method advances the result set pointer to the next result set, which can then be retrieved using getResultSet
 boolean getMoreResults(int current)
           
 java.sql.ParameterMetaData getParameterMetaData()
          Returns information about the parameters set on this PreparedStatement (see java.sql.ParameterMetaData for a detailed description of the provided information).
 int getQueryTimeout()
          The method returns the number of seconds a statement may be in process before timing out.
 java.sql.ResultSet getResultSet()
          This method returns the result set of the SQL statement that was executed.
 int getResultSetConcurrency()
          This method returns the concurrency type of the result set for this statement.
 int getResultSetHoldability()
           
 int getResultSetType()
          This method returns the result set type for this statement.
 int getUpdateCount()
          This method returns the update count of the SQL statement that was executed.
 java.sql.SQLWarning getWarnings()
          This method returns the first SQL warning attached to this statement.
 void setArray(int parameterIndex, java.sql.Array x)
          This method sets the specified parameter from the given Java Array value.
 void setAsciiStream(int parameterIndex, java.io.InputStream x, int length)
          This method sets the specified parameter from the given Java ASCII InputStream value.
 void setBigDecimal(int parameterIndex, java.math.BigDecimal x)
          This method sets the specified parameter from the given Java java.math.BigDecimal value.
 void setBinaryStream(int parameterIndex, java.io.InputStream x, int length)
          This method sets the specified parameter from the given Java binary InputStream value.
 void setBlob(int parameterIndex, java.sql.Blob x)
          This method sets the specified parameter from the given Java Blob value.
 void setBoolean(int parameterIndex, boolean x)
          This method sets the specified parameter from the given Java boolean value.
 void setByte(int parameterIndex, byte x)
          This method sets the specified parameter from the given Java byte value.
 void setBytes(int parameterIndex, byte[] x)
          This method sets the specified parameter from the given Java byte array value.
 void setCharacterStream(int parameterIndex, java.io.Reader reader, int length)
          This method sets the specified parameter from the given Java character Reader value.
 void setClob(int parameterIndex, java.sql.Clob x)
          This method sets the specified parameter from the given Java Clob value.
 void setCursorName(java.lang.String name)
          This method sets the cursor name that will be used by the result set.
 void setDate(int parameterIndex, java.sql.Date x)
          This method sets the specified parameter from the given Java java.sql.Date value.
 void setDate(int parameterIndex, java.sql.Date x, java.util.Calendar cal)
          This method sets the specified parameter from the given Java java.sql.Date value.
 void setDouble(int parameterIndex, double x)
          This method sets the specified parameter from the given Java double value.
 void setEscapeProcessing(boolean enable)
          This method sets the local escape processing mode on or off.
 void setFetchDirection(int direction)
          This method informs the driver which direction the result set will be accessed in.
 void setFetchSize(int rows)
          This method informs the driver how many rows it should fetch from the database at a time.
 void setFloat(int parameterIndex, float x)
          This method sets the specified parameter from the given Java float value.
 void setInt(int parameterIndex, int x)
          This method sets the specified parameter from the given Java int value.
 void setLong(int parameterIndex, long x)
          This method sets the specified parameter from the given Java long value.
 void setMaxFieldSize(int max)
          This method sets the limit for the maximum length of any column in bytes.
 void setMaxRows(int max)
          This method sets the maximum number of rows that can be present in a result set.
 void setNull(int parameterIndex, int sqlType)
          This method populates the specified parameter with a SQL NULL value for the specified type.
 void setNull(int parameterIndex, int sqlType, java.lang.String typeName)
          This method populates the specified parameter with a SQL NULL value for the specified type.
 void setObject(int parameterIndex, java.lang.Object x)
          This method sets the specified parameter from the given Java Object value.
 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType)
          This method sets the specified parameter from the given Java Object value.
 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale)
          This method sets the specified parameter from the given Java Object value.
 void setQueryTimeout(int seconds)
          This method sets the number of seconds a statement may be in process before timing out.
 void setRef(int parameterIndex, java.sql.Ref x)
          This method sets the specified parameter from the given Java Ref value.
 void setShort(int parameterIndex, short x)
          This method sets the specified parameter from the given Java short value.
 void setString(int parameterIndex, java.lang.String x)
          This method sets the specified parameter from the given Java String value.
 void setTime(int parameterIndex, java.sql.Time x)
          This method sets the specified parameter from the given Java java.sql.Time value.
 void setTime(int parameterIndex, java.sql.Time x, java.util.Calendar cal)
          This method sets the specified parameter from the given Java java.sql.Time value.
 void setTimestamp(int parameterIndex, java.sql.Timestamp x)
          This method sets the specified parameter from the given Java java.sql.Timestamp value.
 void setTimestamp(int parameterIndex, java.sql.Timestamp x, java.util.Calendar cal)
          This method sets the specified parameter from the given Java java.sql.Timestamp value.
 void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length)
          Deprecated.  
 void setURL(int parameterIndex, java.net.URL x)
          This method sets the specified parameter from the given Java java.net.URL value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

Field Detail

wrappedStmt

protected java.sql.Statement wrappedStmt

pooledConnection

protected MysqlPooledConnection pooledConnection
Constructor Detail

PreparedStatementWrapper

PreparedStatementWrapper(MysqlPooledConnection conn,
                         java.sql.PreparedStatement toWrap)
Method Detail

setArray

public void setArray(int parameterIndex,
                     java.sql.Array x)
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Array value. The default object type to SQL type mapping will be used.

Specified by:
setArray in interface java.sql.PreparedStatement

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           java.io.InputStream x,
                           int length)
                    throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java ASCII InputStream value.

Specified by:
setAsciiStream in interface java.sql.PreparedStatement

setBigDecimal

public void setBigDecimal(int parameterIndex,
                          java.math.BigDecimal x)
                   throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.math.BigDecimal value.

Specified by:
setBigDecimal in interface java.sql.PreparedStatement

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            java.io.InputStream x,
                            int length)
                     throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java binary InputStream value.

Specified by:
setBinaryStream in interface java.sql.PreparedStatement

setBlob

public void setBlob(int parameterIndex,
                    java.sql.Blob x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Blob value. The default object type to SQL type mapping will be used.

Specified by:
setBlob in interface java.sql.PreparedStatement

setBoolean

public void setBoolean(int parameterIndex,
                       boolean x)
                throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java boolean value.

Specified by:
setBoolean in interface java.sql.PreparedStatement

setByte

public void setByte(int parameterIndex,
                    byte x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java byte value.

Specified by:
setByte in interface java.sql.PreparedStatement

setBytes

public void setBytes(int parameterIndex,
                     byte[] x)
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java byte array value.

Specified by:
setBytes in interface java.sql.PreparedStatement

setCharacterStream

public void setCharacterStream(int parameterIndex,
                               java.io.Reader reader,
                               int length)
                        throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java character Reader value.

Specified by:
setCharacterStream in interface java.sql.PreparedStatement

setClob

public void setClob(int parameterIndex,
                    java.sql.Clob x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Clob value. The default object type to SQL type mapping will be used.

Specified by:
setClob in interface java.sql.PreparedStatement

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Date value.

Specified by:
setDate in interface java.sql.PreparedStatement

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x,
                    java.util.Calendar cal)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Date value.

Specified by:
setDate in interface java.sql.PreparedStatement

setDouble

public void setDouble(int parameterIndex,
                      double x)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java double value.

Specified by:
setDouble in interface java.sql.PreparedStatement

setFloat

public void setFloat(int parameterIndex,
                     float x)
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java float value.

Specified by:
setFloat in interface java.sql.PreparedStatement

setInt

public void setInt(int parameterIndex,
                   int x)
            throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java int value.

Specified by:
setInt in interface java.sql.PreparedStatement

setLong

public void setLong(int parameterIndex,
                    long x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java long value.

Specified by:
setLong in interface java.sql.PreparedStatement

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method returns meta data for the result set from this statement.

Specified by:
getMetaData in interface java.sql.PreparedStatement

setNull

public void setNull(int parameterIndex,
                    int sqlType)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method populates the specified parameter with a SQL NULL value for the specified type.

Specified by:
setNull in interface java.sql.PreparedStatement

setNull

public void setNull(int parameterIndex,
                    int sqlType,
                    java.lang.String typeName)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method populates the specified parameter with a SQL NULL value for the specified type.

Specified by:
setNull in interface java.sql.PreparedStatement

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Object value. The default object type to SQL type mapping will be used.

Specified by:
setObject in interface java.sql.PreparedStatement

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetSqlType)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Object value. The specified SQL object type will be used.

Specified by:
setObject in interface java.sql.PreparedStatement

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetSqlType,
                      int scale)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Object value. The specified SQL object type will be used.

Specified by:
setObject in interface java.sql.PreparedStatement

getParameterMetaData

public java.sql.ParameterMetaData getParameterMetaData()
                                                throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
Returns information about the parameters set on this PreparedStatement (see java.sql.ParameterMetaData for a detailed description of the provided information).

Specified by:
getParameterMetaData in interface java.sql.PreparedStatement

setRef

public void setRef(int parameterIndex,
                   java.sql.Ref x)
            throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java Ref value. The default object type to SQL type mapping will be used.

Specified by:
setRef in interface java.sql.PreparedStatement

setShort

public void setShort(int parameterIndex,
                     short x)
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java short value.

Specified by:
setShort in interface java.sql.PreparedStatement

setString

public void setString(int parameterIndex,
                      java.lang.String x)
               throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java String value.

Specified by:
setString in interface java.sql.PreparedStatement

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Time value.

Specified by:
setTime in interface java.sql.PreparedStatement

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x,
                    java.util.Calendar cal)
             throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Time value.

Specified by:
setTime in interface java.sql.PreparedStatement

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x)
                  throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Timestamp value.

Specified by:
setTimestamp in interface java.sql.PreparedStatement

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x,
                         java.util.Calendar cal)
                  throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.sql.Timestamp value.

Specified by:
setTimestamp in interface java.sql.PreparedStatement

setURL

public void setURL(int parameterIndex,
                   java.net.URL x)
            throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method sets the specified parameter from the given Java java.net.URL value.

Specified by:
setURL in interface java.sql.PreparedStatement

setUnicodeStream

public void setUnicodeStream(int parameterIndex,
                             java.io.InputStream x,
                             int length)
                      throws java.sql.SQLException
Deprecated.  

DOCUMENT ME!

Specified by:
setUnicodeStream in interface java.sql.PreparedStatement

addBatch

public void addBatch()
              throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method adds a set of parameters to the batch for JDBC 2.0.

Specified by:
addBatch in interface java.sql.PreparedStatement

clearParameters

public void clearParameters()
                     throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method clears all of the input parameter that have been set on this statement.

Specified by:
clearParameters in interface java.sql.PreparedStatement

execute

public boolean execute()
                throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method executes a prepared SQL query. Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by executeQuery and executeUpdate.

Specified by:
execute in interface java.sql.PreparedStatement

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method executes a prepared SQL query and returns its ResultSet.

Specified by:
executeQuery in interface java.sql.PreparedStatement

executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException
Description copied from interface: java.sql.PreparedStatement
This method executes an SQL INSERT, UPDATE or DELETE statement. SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
executeUpdate in interface java.sql.PreparedStatement

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the Connection instance that was used to create this object.

Specified by:
getConnection in interface java.sql.Statement

setCursorName

public void setCursorName(java.lang.String name)
                   throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method sets the cursor name that will be used by the result set.

Specified by:
setCursorName in interface java.sql.Statement

setEscapeProcessing

public void setEscapeProcessing(boolean enable)
                         throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method sets the local escape processing mode on or off. The default value is on.

Specified by:
setEscapeProcessing in interface java.sql.Statement

setFetchDirection

public void setFetchDirection(int direction)
                       throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method informs the driver which direction the result set will be accessed in.

Specified by:
setFetchDirection in interface java.sql.Statement

getFetchDirection

public int getFetchDirection()
                      throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the current direction that the driver thinks the result set will be accessed int.

Specified by:
getFetchDirection in interface java.sql.Statement

setFetchSize

public void setFetchSize(int rows)
                  throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method informs the driver how many rows it should fetch from the database at a time.

Specified by:
setFetchSize in interface java.sql.Statement

getFetchSize

public int getFetchSize()
                 throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the number of rows the driver believes should be fetched from the database at a time.

Specified by:
getFetchSize in interface java.sql.Statement

getGeneratedKeys

public java.sql.ResultSet getGeneratedKeys()
                                    throws java.sql.SQLException
Specified by:
getGeneratedKeys in interface java.sql.Statement

setMaxFieldSize

public void setMaxFieldSize(int max)
                     throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method sets the limit for the maximum length of any column in bytes.

Specified by:
setMaxFieldSize in interface java.sql.Statement

getMaxFieldSize

public int getMaxFieldSize()
                    throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the maximum length of any column value in bytes.

Specified by:
getMaxFieldSize in interface java.sql.Statement

setMaxRows

public void setMaxRows(int max)
                throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method sets the maximum number of rows that can be present in a result set.

Specified by:
setMaxRows in interface java.sql.Statement

getMaxRows

public int getMaxRows()
               throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the maximum possible number of rows in a result set.

Specified by:
getMaxRows in interface java.sql.Statement

getMoreResults

public boolean getMoreResults()
                       throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method advances the result set pointer to the next result set, which can then be retrieved using getResultSet

Specified by:
getMoreResults in interface java.sql.Statement

getMoreResults

public boolean getMoreResults(int current)
                       throws java.sql.SQLException
Specified by:
getMoreResults in interface java.sql.Statement

setQueryTimeout

public void setQueryTimeout(int seconds)
                     throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method sets the number of seconds a statement may be in process before timing out. A value of 0 means there is no timeout.

Specified by:
setQueryTimeout in interface java.sql.Statement

getQueryTimeout

public int getQueryTimeout()
                    throws java.sql.SQLException
Description copied from interface: java.sql.Statement
The method returns the number of seconds a statement may be in process before timing out. A value of 0 means there is no timeout.

Specified by:
getQueryTimeout in interface java.sql.Statement

getResultSet

public java.sql.ResultSet getResultSet()
                                throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the result set of the SQL statement that was executed. This should be called only once per result set returned.

Specified by:
getResultSet in interface java.sql.Statement

getResultSetConcurrency

public int getResultSetConcurrency()
                            throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the concurrency type of the result set for this statement. This will be one of the concurrency types defined in ResultSet.

Specified by:
getResultSetConcurrency in interface java.sql.Statement

getResultSetHoldability

public int getResultSetHoldability()
                            throws java.sql.SQLException
Specified by:
getResultSetHoldability in interface java.sql.Statement

getResultSetType

public int getResultSetType()
                     throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the result set type for this statement. This will be one of the result set types defined in ResultSet.

Specified by:
getResultSetType in interface java.sql.Statement

getUpdateCount

public int getUpdateCount()
                   throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the update count of the SQL statement that was executed. This should be called only once per executed SQL statement.

Specified by:
getUpdateCount in interface java.sql.Statement

getWarnings

public java.sql.SQLWarning getWarnings()
                                throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method returns the first SQL warning attached to this statement. Subsequent warnings will be chained to this one.

Specified by:
getWarnings in interface java.sql.Statement

addBatch

public void addBatch(java.lang.String sql)
              throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method adds a SQL statement to a SQL batch. A driver is not required to implement this method.

Specified by:
addBatch in interface java.sql.Statement

cancel

public void cancel()
            throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method cancels an outstanding statement, if the database supports that operation.

Specified by:
cancel in interface java.sql.Statement

clearBatch

public void clearBatch()
                throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method clears out any SQL statements that have been populated in the current batch. A driver is not required to implement this method.

Specified by:
clearBatch in interface java.sql.Statement

clearWarnings

public void clearWarnings()
                   throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method clears any SQL warnings that have been attached to this statement.

Specified by:
clearWarnings in interface java.sql.Statement

close

public void close()
           throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method closes the statement and frees any associated resources.

Specified by:
close in interface java.sql.Statement

execute

public boolean execute(java.lang.String sql,
                       int autoGeneratedKeys)
                throws java.sql.SQLException
Specified by:
execute in interface java.sql.Statement

execute

public boolean execute(java.lang.String sql,
                       int[] columnIndexes)
                throws java.sql.SQLException
Specified by:
execute in interface java.sql.Statement

execute

public boolean execute(java.lang.String sql,
                       java.lang.String[] columnNames)
                throws java.sql.SQLException
Specified by:
execute in interface java.sql.Statement

execute

public boolean execute(java.lang.String sql)
                throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method executes an arbitrary SQL statement of any time. The methods getResultSet, getMoreResults and getUpdateCount retrieve the results.

Specified by:
execute in interface java.sql.Statement

executeBatch

public int[] executeBatch()
                   throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method executes the SQL batch and returns an array of update counts - one for each SQL statement in the batch - ordered in the same order the statements were added to the batch. A driver is not required to implement this method.

Specified by:
executeBatch in interface java.sql.Statement

executeQuery

public java.sql.ResultSet executeQuery(java.lang.String sql)
                                throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method executes the specified SQL SELECT statement and returns a (possibly empty) ResultSet with the results of the query.

Specified by:
executeQuery in interface java.sql.Statement

executeUpdate

public int executeUpdate(java.lang.String sql,
                         int autoGeneratedKeys)
                  throws java.sql.SQLException
Specified by:
executeUpdate in interface java.sql.Statement

executeUpdate

public int executeUpdate(java.lang.String sql,
                         int[] columnIndexes)
                  throws java.sql.SQLException
Specified by:
executeUpdate in interface java.sql.Statement

executeUpdate

public int executeUpdate(java.lang.String sql,
                         java.lang.String[] columnNames)
                  throws java.sql.SQLException
Specified by:
executeUpdate in interface java.sql.Statement

executeUpdate

public int executeUpdate(java.lang.String sql)
                  throws java.sql.SQLException
Description copied from interface: java.sql.Statement
This method executes the specified SQL INSERT, UPDATE, or DELETE statement and returns the number of rows affected, which may be 0.

Specified by:
executeUpdate in interface java.sql.Statement

checkAndFireConnectionError

protected void checkAndFireConnectionError(java.sql.SQLException sqlEx)
                                    throws java.sql.SQLException
Fires connection error event if required, before re-throwing exception