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

Quick Search    Search Deep

com.mockobjects.sql
Class MockPreparedStatement  view MockPreparedStatement download MockPreparedStatement.java

java.lang.Object
  extended bycom.mockobjects.MockObject
      extended bycom.mockobjects.sql.CommonMockStatement
          extended bycom.mockobjects.sql.CommonMockPreparedStatement
              extended bycom.mockobjects.sql.MockPreparedStatement
All Implemented Interfaces:
java.sql.PreparedStatement, java.sql.Statement, com.mockobjects.Verifiable

public class MockPreparedStatement
extends CommonMockPreparedStatement


Field Summary
protected  com.mockobjects.ExpectationCounter myCloseCalls
           
 
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
MockPreparedStatement()
           
 
Method Summary
 void addBatch()
          Calls notImplemented.
 void addBatch(java.lang.String sql)
          This method adds a SQL statement to a SQL batch.
 void addExpectedExecute(java.lang.String queryString, boolean success)
           
 void addExpectedExecuteQuery(java.lang.String queryString, java.sql.ResultSet resultSet)
           
 void addExpectedExecuteUpdate(java.lang.String queryString, int updateCount)
           
 void addExpectedSetParameter(int parameterIndex, int intValue)
           
 void addExpectedSetParameter(int parameterIndex, java.lang.Object parameterValue)
           
 void addExpectedSetParameters(java.lang.Object[] parameters)
           
 void addExpectedTargetSQLType(int aTargetSQLType)
           
 void addResultSet(MockResultSet aResultSet)
           
 void addUpdateCount(int count)
          Added value to be returned by executeUpdate()
 void cancel()
          This method cancels an outstanding statement, if the database supports that operation.
 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()
          Calls innerExecute() (see CommonMockStatement).
 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()
          Returns executeQuery(String) with an empty String.
 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()
          Returns value set with addUpdateCount
 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()
          Calls notImplemented.
 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.
protected  void innerExecute()
           
 void setArray(int param, java.sql.Array array)
          This method sets the specified parameter from the given Java Array value.
 void setAsciiStream(int param, java.io.InputStream inputStream, int length)
          Calls notImplemented.
 void setBigDecimal(int param, java.math.BigDecimal bigDecimal)
          This method sets the specified parameter from the given Java java.math.BigDecimal value.
 void setBinaryStream(int param, java.io.InputStream inputStream, int length)
          Calls notImplemented.
 void setBlob(int param, java.sql.Blob blob)
          This method sets the specified parameter from the given Java Blob value.
 void setBoolean(int param, boolean aBoolean)
          This method sets the specified parameter from the given Java boolean value.
 void setByte(int param, byte aByte)
          This method sets the specified parameter from the given Java byte value.
 void setBytes(int param, byte[] values)
          This method sets the specified parameter from the given Java byte array value.
 void setCharacterStream(int param, java.io.Reader reader, int length)
          Calls notImplemented.
 void setClob(int param, java.sql.Clob clob)
          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 param, java.sql.Date date)
          This method sets the specified parameter from the given Java java.sql.Date value.
 void setDate(int param, java.sql.Date date, java.util.Calendar calendar)
          This method sets the specified parameter from the given Java java.sql.Date value.
 void setDouble(int param, double aDouble)
          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 setExpectedClearParametersCalls(int callCount)
           
 void setExpectedCloseCalls(int callCount)
           
 void setExpectingNoSetParameters()
           
 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 param, float aFloat)
          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 param, long aLong)
          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 param, int param1)
          This method populates the specified parameter with a SQL NULL value for the specified type.
 void setNull(int param, int param1, java.lang.String typeName)
          Calls notImplemented.
 void setObject(int param, java.lang.Object anObject)
          This method sets the specified parameter from the given Java Object value.
 void setObject(int param, java.lang.Object anObject, int aTargetSQLType)
          This method sets the specified parameter from the given Java Object value.
 void setObject(int param, java.lang.Object anObject, int targetSqlType, int scale)
          Calls notImplemented.
 void setQueryTimeout(int seconds)
          This method sets the number of seconds a statement may be in process before timing out.
 void setRef(int param, java.sql.Ref ref)
          This method sets the specified parameter from the given Java Ref value.
 void setShort(int param, short aShort)
          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 param, java.sql.Time time)
          This method sets the specified parameter from the given Java java.sql.Time value.
 void setTime(int param, java.sql.Time time, java.util.Calendar calendar)
          This method sets the specified parameter from the given Java java.sql.Time value.
 void setTimestamp(int param, java.sql.Timestamp timestamp)
          This method sets the specified parameter from the given Java java.sql.Timestamp value.
 void setTimestamp(int param, java.sql.Timestamp timestamp, java.util.Calendar calendar)
          Calls notImplemented.
 void setUnicodeStream(int param, java.io.InputStream inputStream, int length)
          Calls notImplemented.
 void setupConnection(java.sql.Connection conn)
           
 void setupThrowExceptionOnExecute(java.sql.SQLException exception)
           
 void setupUpdateCount(int updateCount)
           
 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 com.mockobjects.MockObject
assertEquals, assertEquals, assertTrue, fail, notImplemented, notYetImplemented, notYetImplemented, verify
 
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, executeBatch, executeQuery, executeUpdate, getConnection, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

Field Detail

myCloseCalls

protected final com.mockobjects.ExpectationCounter myCloseCalls
Constructor Detail

MockPreparedStatement

public MockPreparedStatement()
Method Detail

getMoreResults

public boolean getMoreResults(int current)
                       throws java.sql.SQLException

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.


getGeneratedKeys

public java.sql.ResultSet getGeneratedKeys()
                                    throws java.sql.SQLException

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).


executeUpdate

public int executeUpdate(java.lang.String sql,
                         int autoGeneratedKeys)
                  throws java.sql.SQLException

executeUpdate

public int executeUpdate(java.lang.String sql,
                         int[] columnIndexes)
                  throws java.sql.SQLException

executeUpdate

public int executeUpdate(java.lang.String sql,
                         java.lang.String[] columnNames)
                  throws java.sql.SQLException

execute

public boolean execute(java.lang.String sql,
                       int autoGeneratedKeys)
                throws java.sql.SQLException

execute

public boolean execute(java.lang.String sql,
                       int[] columnIndexes)
                throws java.sql.SQLException

execute

public boolean execute(java.lang.String sql,
                       java.lang.String[] columnNames)
                throws java.sql.SQLException

getResultSetHoldability

public int getResultSetHoldability()
                            throws java.sql.SQLException

addResultSet

public void addResultSet(MockResultSet aResultSet)

addExpectedSetParameter

public void addExpectedSetParameter(int parameterIndex,
                                    int intValue)

addExpectedSetParameter

public void addExpectedSetParameter(int parameterIndex,
                                    java.lang.Object parameterValue)

addExpectedSetParameters

public void addExpectedSetParameters(java.lang.Object[] parameters)

addExpectedTargetSQLType

public void addExpectedTargetSQLType(int aTargetSQLType)

setExpectedClearParametersCalls

public void setExpectedClearParametersCalls(int callCount)

setExpectingNoSetParameters

public void setExpectingNoSetParameters()

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
Calls innerExecute() (see CommonMockStatement). Returns false.

Specified by:
execute in interface java.sql.PreparedStatement

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
Returns executeQuery(String) with an empty String.

Specified by:
executeQuery in interface java.sql.PreparedStatement

addUpdateCount

public void addUpdateCount(int count)
Added value to be returned by executeUpdate()


executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException
Returns value set with addUpdateCount

Specified by:
executeUpdate 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

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

setTimestamp

public void setTimestamp(int param,
                         java.sql.Timestamp timestamp)
                  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

setClob

public void setClob(int param,
                    java.sql.Clob clob)
             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

setLong

public void setLong(int param,
                    long aLong)
             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

setNull

public void setNull(int param,
                    int param1)
             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

setArray

public void setArray(int param,
                     java.sql.Array array)
              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

setShort

public void setShort(int param,
                     short aShort)
              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

setTime

public void setTime(int param,
                    java.sql.Time time,
                    java.util.Calendar calendar)
             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

setObject

public void setObject(int param,
                      java.lang.Object anObject,
                      int aTargetSQLType)
               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

setRef

public void setRef(int param,
                   java.sql.Ref ref)
            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

setDate

public void setDate(int param,
                    java.sql.Date date)
             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

setFloat

public void setFloat(int param,
                     float aFloat)
              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

setBlob

public void setBlob(int param,
                    java.sql.Blob blob)
             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

setDate

public void setDate(int param,
                    java.sql.Date date,
                    java.util.Calendar calendar)
             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

setBytes

public void setBytes(int param,
                     byte[] values)
              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

setObject

public void setObject(int param,
                      java.lang.Object anObject)
               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

setByte

public void setByte(int param,
                    byte aByte)
             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

setDouble

public void setDouble(int param,
                      double aDouble)
               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

setTime

public void setTime(int param,
                    java.sql.Time time)
             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

setBoolean

public void setBoolean(int param,
                       boolean aBoolean)
                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

setBigDecimal

public void setBigDecimal(int param,
                          java.math.BigDecimal bigDecimal)
                   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

addBatch

public void addBatch()
              throws java.sql.SQLException
Calls notImplemented.

Specified by:
addBatch in interface java.sql.PreparedStatement

setObject

public void setObject(int param,
                      java.lang.Object anObject,
                      int targetSqlType,
                      int scale)
               throws java.sql.SQLException
Calls notImplemented.

Specified by:
setObject in interface java.sql.PreparedStatement

setCharacterStream

public void setCharacterStream(int param,
                               java.io.Reader reader,
                               int length)
                        throws java.sql.SQLException
Calls notImplemented.

Specified by:
setCharacterStream in interface java.sql.PreparedStatement

setAsciiStream

public void setAsciiStream(int param,
                           java.io.InputStream inputStream,
                           int length)
                    throws java.sql.SQLException
Calls notImplemented.

Specified by:
setAsciiStream in interface java.sql.PreparedStatement

setBinaryStream

public void setBinaryStream(int param,
                            java.io.InputStream inputStream,
                            int length)
                     throws java.sql.SQLException
Calls notImplemented.

Specified by:
setBinaryStream in interface java.sql.PreparedStatement

setNull

public void setNull(int param,
                    int param1,
                    java.lang.String typeName)
             throws java.sql.SQLException
Calls notImplemented.

Specified by:
setNull in interface java.sql.PreparedStatement

setUnicodeStream

public void setUnicodeStream(int param,
                             java.io.InputStream inputStream,
                             int length)
                      throws java.sql.SQLException
Calls notImplemented.

Specified by:
setUnicodeStream in interface java.sql.PreparedStatement

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
Calls notImplemented. Returns null.

Specified by:
getMetaData in interface java.sql.PreparedStatement

setTimestamp

public void setTimestamp(int param,
                         java.sql.Timestamp timestamp,
                         java.util.Calendar calendar)
                  throws java.sql.SQLException
Calls notImplemented.

Specified by:
setTimestamp in interface java.sql.PreparedStatement

addExpectedExecuteQuery

public void addExpectedExecuteQuery(java.lang.String queryString,
                                    java.sql.ResultSet resultSet)

addExpectedExecuteUpdate

public void addExpectedExecuteUpdate(java.lang.String queryString,
                                     int updateCount)

addExpectedExecute

public void addExpectedExecute(java.lang.String queryString,
                               boolean success)

setExpectedCloseCalls

public void setExpectedCloseCalls(int callCount)

setupConnection

public void setupConnection(java.sql.Connection conn)

setupThrowExceptionOnExecute

public void setupThrowExceptionOnExecute(java.sql.SQLException exception)

setupUpdateCount

public void setupUpdateCount(int updateCount)

innerExecute

protected void innerExecute()
                     throws java.sql.SQLException

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)
                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

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)
                  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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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