    All Packages    This Package  Previous  Next

# Class sqlj.runtime.profile.ref.RTStatementJDBCBase

    java.lang.Object
       |
       +----sqlj.runtime.profile.ref.RTStatementJDBCBase

public class RTStatementJDBCBase
extends Object

This class implements the portion of the RTStatement interface that pertains to PREPARED statements (no out-parameter support). It is implemented using a JDBC prepared statement.

##

preparedStmt
  The underlying JDBC prepared statement with which this class is implemented

##

RTStatementJDBCBase(PreparedStatement)
  Creates a new statement base that uses the passed PreparedStatement to implement its methods.

##

cancel()
  Calls the `cancel` method on the underlying prepared statement.
clearWarnings()
  Calls the `clearWarnings` method on the underlying prepared statement.
execute()
  Returns the result of calling the `execute` method on the underlying prepared statement.
executeComplete()
  Called once the execution of this statement (and all the required gets) have been made.
executeRTQuery()
  Returns the result of calling the `executeQuery` method on the underlying prepared statement.
executeUpdate()
  Returns the result of calling the `executeUpdate` method on the underlying prepared statement.
getJDBCPreparedStatement()
  Returns the underlying prepared statement with which this object was created.
getMaxFieldSize()
  Returns the result of calling the `getMaxFieldSize` method on the underlying prepared statement.
getMaxRows()
  Returns the result of calling the `getMaxRows` method on the underlying prepared statement.
getMoreResults()
  Returns the result of calling the `getMoreResults` method on the underlying prepared statement.
getQueryTimeout()
  Returns the result of calling the `getQueryTimeout` method on the underlying prepared statement.
getResultSet()
  Returns the result of calling the `getResultSet` method on the underlying prepared statement.
getUpdateCount()
  Returns the result of calling the `getUpdateCount` method on the underlying prepared statement.
getWarnings()
  Returns the result of calling the `getWarnings` method on the underlying prepared statement.
setAsciiStreamWrapper(int, AsciiStream)
  Calls the `setAsciiStream` method on the underlying statement, passing the InputStream and length of the passed stream parameter.
setBigDecimal(int, BigDecimal)
  Calls the `setBigDecimal` method on the underlying prepared statement.
setBinaryStreamWrapper(int, BinaryStream)
  Calls the `setBinaryStream` method on the underlying statement, passing the InputStream and length of the passed stream parameter.
setBoolean(int, boolean)
  Calls the `setBoolean` method on the underlying prepared statement.
setBooleanWrapper(int, Boolean)
  Converts the passed parameter to a primitive type and calls the `setBoolean` method on the underlying statement.
setByte(int, byte)
  Calls the `setByte` method on the underlying prepared statement.
setBytes(int, byte[])
  Calls the `setBytes` method on the underlying prepared statement.
setByteWrapper(int, Byte)
  Converts the passed parameter to a primitive type and calls the `setByte` method on the underlying statement.
setDate(int, Date)
  Calls the `setDate` method on the underlying prepared statement.
setDouble(int, double)
  Calls the `setDouble` method on the underlying prepared statement.
setDoubleWrapper(int, Double)
  Converts the passed parameter to a primitive type and calls the `setDouble` method on the underlying statement.
setFloat(int, float)
  Calls the `setFloat` method on the underlying prepared statement.
setFloatWrapper(int, Float)
  Converts the passed parameter to a primitive type and calls the `setFloat` method on the underlying statement.
setInt(int, int)
  Calls the `setInt` method on the underlying prepared statement.
setIntWrapper(int, Integer)
  Converts the passed parameter to a primitive type and calls the `setInt` method on the underlying statement.
setLong(int, long)
  Calls the `setLong` method on the underlying prepared statement.
setLongWrapper(int, Long)
  Converts the passed parameter to a primitive type and calls the `setLong` method on the underlying statement.
setMaxFieldSize(int)
  Calls the `setMaxFieldSize` method on the underlying prepared statement.
setMaxRows(int)
  Calls the `setMaxRows` method on the underlying prepared statement.
setObject(int, Object)
  Calls the `setObject` method on the underlying prepared statement.
setQueryTimeout(int)
  Calls the `setQueryTimeout` method on the underlying prepared statement.
setShort(int, short)
  Calls the `setShort` method on the underlying prepared statement.
setShortWrapper(int, Short)
  Converts the passed parameter to a primitive type and calls the `setShort` method on the underlying statement.
setString(int, String)
  Calls the `setString` method on the underlying prepared statement.
setTime(int, Time)
  Calls the `setTime` method on the underlying prepared statement.
setTimestamp(int, Timestamp)
  Calls the `setTimestamp` method on the underlying prepared statement.
setUnicodeStreamWrapper(int, UnicodeStream)
  Calls the `setUnicodeStream` method on the underlying statement, passing the InputStream and length of the passed stream parameter.

##

preparedStmt

     protected PreparedStatement preparedStmt

  The underlying JDBC prepared statement with which this class is implemented

##

RTStatementJDBCBase

     public RTStatementJDBCBase(PreparedStatement preparedStmt)

  Creates a new statement base that uses the passed PreparedStatement to implement its methods.

  Parameters:
    preparedStmt - the underlying JDBC prepared statement

##

getJDBCPreparedStatement

     public PreparedStatement getJDBCPreparedStatement()

  Returns the underlying prepared statement with which this object was created. Note that unlike RTStatement, this method does not throw an exception since it always has a preparedStatement object.

getMaxFieldSize

     public int getMaxFieldSize() throws SQLException

  Returns the result of calling the `getMaxFieldSize` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setMaxFieldSize

     public void setMaxFieldSize(int max) throws SQLException

  Calls the `setMaxFieldSize` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

getMaxRows

     public int getMaxRows() throws SQLException

  Returns the result of calling the `getMaxRows` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setMaxRows

     public void setMaxRows(int max) throws SQLException

  Calls the `setMaxRows` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

getQueryTimeout

     public int getQueryTimeout() throws SQLException

  Returns the result of calling the `getQueryTimeout` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setQueryTimeout

     public void setQueryTimeout(int seconds) throws SQLException

  Calls the `setQueryTimeout` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

cancel

     public void cancel() throws SQLException

  Calls the `cancel` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

getWarnings

     public SQLWarning getWarnings() throws SQLException

  Returns the result of calling the `getWarnings` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

clearWarnings

     public void clearWarnings() throws SQLException

  Calls the `clearWarnings` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

getResultSet

     public ResultSet getResultSet() throws SQLException

  Returns the result of calling the `getResultSet` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

getUpdateCount

     public int getUpdateCount() throws SQLException

  Returns the result of calling the `getUpdateCount` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

getMoreResults

     public boolean getMoreResults() throws SQLException

  Returns the result of calling the `getMoreResults` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

executeRTQuery

     public RTResultSet executeRTQuery() throws SQLException

  Returns the result of calling the `executeQuery` method on the underlying prepared statement. The result set is wrapped in an RTResultSetJDBC before being returned.

  Throws: SQLException
    is an error is raised by the wrapped statement
  See Also:
    RTResultSetJDBC

executeUpdate

     public int executeUpdate() throws SQLException

  Returns the result of calling the `executeUpdate` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setBoolean

     public void setBoolean(int parameterIndex,
                            boolean x) throws SQLException

  Calls the `setBoolean` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setByte

     public void setByte(int parameterIndex,
                         byte x) throws SQLException

  Calls the `setByte` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setShort

     public void setShort(int parameterIndex,
                          short x) throws SQLException

  Calls the `setShort` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setInt

     public void setInt(int parameterIndex,
                        int x) throws SQLException

  Calls the `setInt` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setLong

     public void setLong(int parameterIndex,
                         long x) throws SQLException

  Calls the `setLong` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setFloat

     public void setFloat(int parameterIndex,
                          float x) throws SQLException

  Calls the `setFloat` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setDouble

     public void setDouble(int parameterIndex,
                           double x) throws SQLException

  Calls the `setDouble` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setBigDecimal

     public void setBigDecimal(int parameterIndex,
                               BigDecimal x) throws SQLException

  Calls the `setBigDecimal` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setString

     public void setString(int parameterIndex,
                           String x) throws SQLException

  Calls the `setString` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setBytes

     public void setBytes(int parameterIndex,
                          byte x[]) throws SQLException

  Calls the `setBytes` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setDate

     public void setDate(int parameterIndex,
                         Date x) throws SQLException

  Calls the `setDate` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setTime

     public void setTime(int parameterIndex,
                         Time x) throws SQLException

  Calls the `setTime` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setTimestamp

     public void setTimestamp(int parameterIndex,
                              Timestamp x) throws SQLException

  Calls the `setTimestamp` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

setObject

     public void setObject(int parameterIndex,
                           Object x) throws SQLException

  Calls the `setObject` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

execute

     public boolean execute() throws SQLException

  Returns the result of calling the `execute` method on the underlying prepared statement.

  Throws: SQLException
    is an error is raised by the wrapped statement

executeComplete

     public void executeComplete() throws SQLException

  Called once the execution of this statement (and all the required gets) have been made. This is a gaurantee that no further calls will be made to this statement. Once executeComplete has been called, further calls to any other method and undefined and may result in a SQLException.

  If there are no open result sets on this statement, the underlying statement is closed. Otherwise, the close of the underlying statement will be delyaed until all open result sets on this statement have been closed.

  Throws: SQLException
    if an error occurs closing the underlying statement

setBooleanWrapper

     public void setBooleanWrapper(int paramIndex,
                                   Boolean x) throws SQLException

  Converts the passed parameter to a primitive type and calls the `setBoolean` method on the underlying statement. If the passed parameter value is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed wrapper object.

  Throws: SQLException
    if an error occurs in the underlying statement.

setByteWrapper

     public void setByteWrapper(int paramIndex,
                                Byte x) throws SQLException

  Converts the passed parameter to a primitive type and calls the `setByte` method on the underlying statement. If the passed parameter value is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed wrapper object.

  Throws: SQLException
    if an error occurs in the underlying statement.

setShortWrapper

     public void setShortWrapper(int paramIndex,
                                 Short x) throws SQLException

  Converts the passed parameter to a primitive type and calls the `setShort` method on the underlying statement. If the passed parameter value is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed wrapper object.

  Throws: SQLException
    if an error occurs in the underlying statement.

setIntWrapper

     public void setIntWrapper(int paramIndex,
                               Integer x) throws SQLException

  Converts the passed parameter to a primitive type and calls the `setInt` method on the underlying statement. If the passed parameter value is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed wrapper object.

  Throws: SQLException
    if an error occurs in the underlying statement.

setLongWrapper

     public void setLongWrapper(int paramIndex,
                                Long x) throws SQLException

  Converts the passed parameter to a primitive type and calls the `setLong` method on the underlying statement. If the passed parameter value is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed wrapper object.

  Throws: SQLException
    if an error occurs in the underlying statement.

setFloatWrapper

     public void setFloatWrapper(int paramIndex,
                                 Float x) throws SQLException

  Converts the passed parameter to a primitive type and calls the `setFloat` method on the underlying statement. If the passed parameter value is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed wrapper object.

  Throws: SQLException
    if an error occurs in the underlying statement.

setDoubleWrapper

     public void setDoubleWrapper(int paramIndex,
                                  Double x) throws SQLException

  Converts the passed parameter to a primitive type and calls the `setDouble` method on the underlying statement. If the passed parameter value is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed wrapper object.

  Throws: SQLException
    if an error occurs in the underlying statement.

setAsciiStreamWrapper

     public void setAsciiStreamWrapper(int paramIndex,
                                       AsciiStream x) throws SQLException

  Calls the `setAsciiStream` method on the underlying statement, passing the InputStream and length of the passed stream parameter. If the passed stream is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed stream.

  Throws: SQLException
    if an error occurs in the underlying statement.

setBinaryStreamWrapper

     public void setBinaryStreamWrapper(int paramIndex,
                                        BinaryStream x) throws SQLException

  Calls the `setBinaryStream` method on the underlying statement, passing the InputStream and length of the passed stream parameter. If the passed stream is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed stream.

  Throws: SQLException
    if an error occurs in the underlying statement.

setUnicodeStreamWrapper

     public void setUnicodeStreamWrapper(int paramIndex,
                                         UnicodeStream x) throws SQLException

  Calls the `setUnicodeStream` method on the underlying statement, passing the InputStream and length of the passed stream parameter. If the passed stream is null, calls `setNull` on the underlying statement using the default SQL type mapping for the passed stream.

  Throws: SQLException
    if an error occurs in the underlying statement.

    All Packages    This Package  Previous  Next