    All Packages    This Package  Previous  Next

# Interface sqlj.runtime.profile.RTStatement

public interface interface RTStatement

This interface defines the operations used to execute a SQL statement described by a profile entry. It is based strongly on the JDBC Statement, PreparedStatement and CallableStatment interfaces, and can be implemented using one of these statements. In general, any method with the same name as one of those in the JDBC Statement interfaces is intended to have the same semantic behavior. Methods with new names are intended to have new behavior. Note, however, that all new methods can be implemented in terms of calls to other methods in the JDBC statement interfaces. The primary difference between this interface and the JDBC statement interfaces is the addition of getter methods that throw exceptions on fetch of null primitives, and a redefinition of statement "close" semantics.

By partitioning new methods into a different namespace, it is possible for a JDBC driver to implement both the JDBC statement interfaces and this interface, allowing more efficient runtime performance in both the dynamic and static case.

The following tables describe the differences between the methods of the JDBC Statement interfaces, and the methods of this interface.

Methods kept from java.sql.Statement
cancel() |
getMaxFieldSize() |
setMaxFieldSize(int) |
getMaxRows() |
setMaxRows(int) |
getMoreResults() |
getQueryTimeout() |
setQueryTimeout(int) |
getUpdateCount() |
getWarnings() |
clearWarnings() |
getResultSet() |

Methods not included from java.sql.Statement
Method Removed | Replacement Method
--- | ---
setEscapeProcessing(boolean) |
close() | executeComplete()
execute(String) |
executeQuery(String) |
executeUpdate(String) |
setCursorName(String) |

Methods kept from java.sql.PreparedStatement
execute() |
executeUpdate() |
setBigDecimal(int,BigDecimal) |
setBoolean(int,boolean) |
setByte(int,byte) |
setBytes(int,byte[]) |
setDate(int,Date) |
setDouble(int,double) |
setFloat(int,float) |
setInt(int,int) |
setLong(int,long) |
setObject(int,Object) |
setShort(int,short) |
setString(int,String) |
setTime(int,String) |
setTimestamp(int,String) |

Methods not included from java.sql.PreparedStatement
Method Removed | Replacement Method
--- | ---
setNull(int,int) | setBooleanWrapper(int,Boolean) setByteWrapper(int,Byte) setShortWrapper(int,Short) setIntWrapper(int,Integer) setLongWrapper(int,Long) setFloatWrapper(int,Float) setDoubleWrapper(int,Double)
setAsciiStream(int,InputStream) | setAsciiStreamWrapper(int,AsciiStream)
setBinaryStream(int,InputStream) | setBinaryStreamWrapper(int,BinaryStream)
setUnicodeStream(int,InputStream) | setUnicodeStreamWrapper(int,UnicodeStream)
clearParameters() |
setObject(int, Object, int, int) |
setObject(int, Object, int) |
executeQuery() | executeRTQuery()

Methods kept from java.sql.CallableStatement
getBytes(int) |
getDate(int) |
getString(int) |
getTime(int) |
getTimestamp(int) |

Methods not included from java.sql.CallableStatement
Method Removed | Replacement Method
--- | ---
registerOutParameter(int,int) |
registerOutParameter(int,int,int) |
getBoolean(int) | getBooleanNoNull(int)
getByte(int) | getByteNoNull(int)
getShort(int) | getShortNoNull(int)
getInt(int) | getIntNoNull(int)
getLong(int) | getLongNoNull(int)
getFloat(int) | getFloatNoNull(int)
getDouble(int) | getDoubleNoNull(int)
getObject(int) | getObject(int, Class)
wasNull() | getBooleanWrapper(int) getByteWrapper(int) getShortWrapper(int) getIntWrapper(int) getLongWrapper(int) getFloatWrapper(int) getDoubleWrapper(int)
getBigDecimal(int,int) | getBigDecimal(int)

Additional methods unique to RTStatement
| getJDBCPreparedStatement()
| getJDBCCallableStatement()

Additional notes:

- Escape processing is handled by the vendor customization. By default, it is on since the SQL strings stored in the profile entry are in escaped syntax. However, a driver may remove the escape clauses before application runtime, in which case escape processing could be shut off by the statement implementation.
- Execute methods which take a SQL String argument are omitted since the static SQL string is known from the profile entry.
- The cursor name does not need to be set explicitly since POSITIONED statements are handled by passing the iterator object itself.
- The registerOutParameter methods are omitted since the types of the out parameters are stored in the profile and can be implicitly registered by the statement implementation.

##

cancel()
  Cancel can be used by one thread to cancel a statement that is being executed by another thread.
clearWarnings()
  After this call, getWarnings returns null until a new warning is reported for this Statement.
execute()
  Some statements return multiple results; the execute method handles these complex statements.
executeComplete()
  Called once the execution of this statement (and all the required gets) have been made.
executeRTQuery()
  The prepared SQL query described by the profile entry for this statement is executed and its RTResultSet is returned.
executeUpdate()
  Execute the SQL operation described by the profile entry for this statement.
getBigDecimal(int)
  Get the value of a SQL NUMERIC parameter as a java.math.BigDecimal.
getBooleanNoNull(int)
  Get the value of a SQL BIT parameter as a Java boolean.
getBooleanWrapper(int)
  Get the value of a SQL BIT parameter as a java.lang.Boolean.
getByteNoNull(int)
  Get the value of a SQL TINYINT parameter as a Java byte.
getBytes(int)
  Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[].
getByteWrapper(int)
  Get the value of a SQL TINYINT parameter as a java.lang.Byte.
getDate(int)
  Get the value of a SQL DATE parameter as a java.sql.Date.
getDoubleNoNull(int)
  Get the value of a SQL DOUBLE parameter as a Java double.
getDoubleWrapper(int)
  Get the value of a SQL DOUBLE parameter as a java.lang.Double.
getFloatNoNull(int)
  Get the value of a SQL FLOAT parameter as a Java float.
getFloatWrapper(int)
  Get the value of a SQL FLOAT parameter as a java.lang.Float.
getIntNoNull(int)
  Get the value of a SQL INTEGER parameter as a Java int.
getIntWrapper(int)
  Get the value of a SQL INTEGER parameter as a java.lang.Integer.
getJDBCCallableStatement()
  Returns a representation of this statement object as a JDBC callable statement.
getJDBCPreparedStatement()
  Returns a representation of this statement object as a JDBC prepared statement.
getLongNoNull(int)
  Get the value of a SQL BIGINT parameter as a Java long.
getLongWrapper(int)
  Get the value of a SQL BIGINT parameter as a java.lang.Long.
getMaxFieldSize()
  The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns.
getMaxRows()
  The maxRows limit is the maximum number of rows that a ResultSet returned by this statement can contain.
getMoreResults()
  Moves to a Statement's next result.
getObject(int, Class)
  Get the value of a parameter as a java.lang.Object.
getQueryTimeout()
  The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
getResultSet()
  Returns the current result as a ResultSet.
getShortNoNull(int)
  Get the value of a SQL SMALLINT parameter as a Java short.
getShortWrapper(int)
  Get the value of a SQL SMALLINT parameter as a java.lang.Short.
getString(int)
  Get the value of a SQL CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String.
getTime(int)
  Get the value of a SQL TIME parameter as a java.sql.Time.
getTimestamp(int)
  Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp.
getUpdateCount()
  Returns the current result as an update count; if the result is a ResultSet or there are no more results, -1 is returned.
getWarnings()
  The first warning reported by calls on this Statement is returned.
setAsciiStreamWrapper(int, AsciiStream)
  Set a parameter to a sqlj.runtime.AsciiStream value.
setBigDecimal(int, BigDecimal)
  Set a parameter to a java.math.Bigdecimal value.
setBinaryStreamWrapper(int, BinaryStream)
  Set a parameter to a sqlj.runtime.BinaryStream value.
setBoolean(int, boolean)
  Set a parameter to a Java boolean value.
setBooleanWrapper(int, Boolean)
  Set a parameter to a java.lang.Boolean value.
setByte(int, byte)
  Set a parameter to a Java byte value.
setBytes(int, byte[])
  Set a parameter to a Java array of bytes.
setByteWrapper(int, Byte)
  Set a parameter to a java.lang.Byte value.
setDate(int, Date)
  Set a parameter to a java.sql.Date value.
setDouble(int, double)
  Set a parameter to a Java double value.
setDoubleWrapper(int, Double)
  Set a parameter to a java.lang.Double value.
setFloat(int, float)
  Set a parameter to a Java float value.
setFloatWrapper(int, Float)
  Set a parameter to a java.lang.Float value.
setInt(int, int)
  Set a parameter to a Java int value.
setIntWrapper(int, Integer)
  Set a parameter to a java.lang.Integer value.
setLong(int, long)
  Set a parameter to a Java long value.
setLongWrapper(int, Long)
  Set a parameter to a java.lang.Long value.
setMaxFieldSize(int)
  The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns.
setMaxRows(int)
  The maxRows limit is the maximum number of rows that a ResultSet returned by this statement can contain.
setObject(int, Object)
  Set a parameter to a Java object value.
setQueryTimeout(int)
  The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
setShort(int, short)
  Set a parameter to a Java short value.
setShortWrapper(int, Short)
  Set a parameter to a java.lang.Short value.
setString(int, String)
  Set a parameter to a java.lang.String value.
setTime(int, Time)
  Set a parameter to a java.sql.Time value.
setTimestamp(int, Timestamp)
  Set a parameter to a java.sql.Timestamp value.
setUnicodeStreamWrapper(int, UnicodeStream)
  Set a parameter to a sqlj.runtime.UnicodeStream value.

##

getJDBCPreparedStatement

     public abstract PreparedStatement getJDBCPreparedStatement() throws SQLException

  Returns a representation of this statement object as a JDBC prepared statement. Operations performed on the returned statement affect the state of this object as well.

  Returns:
    a JDBC prepared statement representing this object.
  Throws: SQLException
    if this object cannot be represented as a JDBC prepared statement.

getJDBCCallableStatement

     public abstract CallableStatement getJDBCCallableStatement() throws SQLException

  Returns a representation of this statement object as a JDBC callable statement. Operations performed on the returned statement affect the state of this object as well.

  Returns:
    a JDBC callable statement representing this object.
  Throws: SQLException
    if this object cannot be represented as a JDBC callable statement.

getMaxFieldSize

     public abstract int getMaxFieldSize() throws SQLException

  The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. These columns may be fetched into Java targets of type byte[], String, or stream. If the limit is exceeded, the excess data is silently discarded. The default maxFieldSize is 0.

  Returns:
    the current max column size limit; zero means unlimited
  Throws: SQLException
    if a database-access error occurs.

setMaxFieldSize

     public abstract void setMaxFieldSize(int max) throws SQLException

  The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. These columns may be fetched into Java targets of type byte[], String, or stream. If the limit is exceeded, the excess data is silently discarded.

  Note: max field size is an optional feature that may not be supported by some implementations. In such cases, an SQLException is raised by this method.

  Parameters:
    max - the new max column size limit; zero means unlimited
  Throws: SQLException
    if a database-access error occurs.

getMaxRows

     public abstract int getMaxRows() throws SQLException

  The maxRows limit is the maximum number of rows that a ResultSet returned by this statement can contain. If the limit is exceeded, the excess rows are silently dropped. The default maxRows value is 0.

  Returns:
    the current max row limit; zero means unlimited
  Throws: SQLException
    if a database-access error occurs.

setMaxRows

     public abstract void setMaxRows(int max) throws SQLException

  The maxRows limit is the maximum number of rows that a ResultSet returned by this statement can contain. If the limit is exceeded, the excess rows are silently dropped.

  Note: max row is an optional feature that may not be supported by some implementations. In such cases, an SQLException is raised by this method.

  Parameters:
    max - the new max row limit; zero means unlimited
  Throws: SQLException
    if a database-access error occurs.

getQueryTimeout

     public abstract int getQueryTimeout() throws SQLException

  The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded, a SQLException is thrown. The default queryTimeout is 0.

  Returns:
    the current query timeout limit in seconds; zero means unlimited
  Throws: SQLException
    if a database-access error occurs.

setQueryTimeout

     public abstract void setQueryTimeout(int seconds) throws SQLException

  The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded, a SQLException is thrown.

  Note: query timeout is an optional feature that may not be supported by some implementations. In such cases, an SQLException is raised by this method.

  Parameters:
    seconds - the new query timeout limit in seconds; zero means unlimited
  Throws: SQLException
    if a database-access error occurs.

cancel

     public abstract void cancel() throws SQLException

  Cancel can be used by one thread to cancel a statement that is being executed by another thread.

  Throws: SQLException
    if a database-access error occurs.

getWarnings

     public abstract SQLWarning getWarnings() throws SQLException

  The first warning reported by calls on this Statement is returned. A Statment's execute methods clear its SQLWarning chain. Subsequent Statement warnings will be chained to this SQLWarning.

  The warning chain is automatically cleared each time a statement is (re)executed.

  Note: If you are processing a ResultSet then any warnings associated with ResultSet reads will be chained on the ResultSet object.

  Returns:
    the first SQLWarning or null
  Throws: SQLException
    if a database-access error occurs.

clearWarnings

     public abstract void clearWarnings() throws SQLException

  After this call, getWarnings returns null until a new warning is reported for this Statement.

  Throws: SQLException
    if a database-access error occurs.

getResultSet

     public abstract ResultSet getResultSet() throws SQLException

  Returns the current result as a ResultSet. It is only called once per result when using the `execute` method.

  Note: This method is used iff the execute type of the profile entry for this statement has value EXECUTE.

  Returns:
    the current result as a ResultSet; null if the result is an update count or there are no more results
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    execute, getExecuteType, EXECUTE

getUpdateCount

     public abstract int getUpdateCount() throws SQLException

  Returns the current result as an update count; if the result is a ResultSet or there are no more results, -1 is returned. It is only called once per result.

  Note: This method is used iff the execute type of the profile entry for this statement has value EXECUTE.

  Returns:
    the current result as an update count; -1 if it is a ResultSet or there are no more results
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    execute, getExecuteType, EXECUTE

getMoreResults

     public abstract boolean getMoreResults() throws SQLException

  Moves to a Statement's next result. It returns true if this result is a ResultSet. `getMoreResults` also implicitly closes any current ResultSet obtained with `getResultSet`. There are no more results when (!getMoreResults() && (getUpdateCount() == -1)).

  Note: This method is used iff the execute type of the profile entry for this statement has value EXECUTE.

  Returns:
    true if the next result is a ResultSet; false if it is an update count or there are no more results
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    execute, getExecuteType, EXECUTE

executeRTQuery

     public abstract RTResultSet executeRTQuery() throws SQLException

  The prepared SQL query described by the profile entry for this statement is executed and its RTResultSet is returned.

  Note: This method is used iff the execute type of the profile entry for this statement has value EXECUTE_QUERY.

  Returns:
    a RTResultSet that contains the data produced by the query; never null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getExecuteType, EXECUTE_QUERY

executeUpdate

     public abstract int executeUpdate() throws SQLException

  Execute the SQL operation described by the profile entry for this statement.

  Note: This method is used iff the execute type of the profile entry for this statement has value EXECUTE_UPDATE.

  Returns:
    either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getExecuteType, EXECUTE_UPDATE

setBoolean

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

  Set a parameter to a Java boolean value. The driver converts this to a SQL BIT value when it sends it to the database.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=boolean.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setByte

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

  Set a parameter to a Java byte value. The driver converts this to a SQL TINYINT value when it sends it to the database.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=byte.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setShort

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

  Set a parameter to a Java short value. The driver converts this to a SQL SMALLINT value when it sends it to the database.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=short.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setInt

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

  Set a parameter to a Java int value. The driver converts this to a SQL INTEGER value when it sends it to the database.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=int.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setLong

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

  Set a parameter to a Java long value. The driver converts this to a SQL BIGINT value when it sends it to the database.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=long.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setFloat

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

  Set a parameter to a Java float value. The driver converts this to a SQL FLOAT value when it sends it to the database.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=float.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setDouble

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

  Set a parameter to a Java double value. The driver converts this to a SQL DOUBLE value when it sends it to the database.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=double.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setBooleanWrapper

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

  Set a parameter to a java.lang.Boolean value. The driver converts this to a SQL BIT value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.lang.Boolean.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setByteWrapper

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

  Set a parameter to a java.lang.Byte value. The driver converts this to a SQL TINYINT value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.lang.Byte.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setShortWrapper

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

  Set a parameter to a java.lang.Short value. The driver converts this to a SQL SMALLINT value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.lang.Short.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setIntWrapper

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

  Set a parameter to a java.lang.Integer value. The driver converts this to a SQL INTEGER value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.lang.Integer.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setLongWrapper

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

  Set a parameter to a java.lang.Long value. The driver converts this to a SQL BIGINT value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.lang.Long.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setFloatWrapper

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

  Set a parameter to a java.lang.Float value. The driver converts this to a SQL FLOAT value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.lang.Float.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setDoubleWrapper

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

  Set a parameter to a java.lang.Double value. The driver converts this to a SQL DOUBLE value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.lang.Double.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setBigDecimal

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

  Set a parameter to a java.math.Bigdecimal value. The driver converts this to a SQL NUMERIC value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.math.BigDecimal

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setString

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

  Set a parameter to a java.lang.String value. The driver converts this to a SQL VARCHAR or LONGVARCHAR value (depending on the arguments size relative to the driver's limits on VARCHARs) when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.lang.String.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setBytes

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

  Set a parameter to a Java array of bytes. The driver converts this to a SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARYs) when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=[byte.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setDate

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

  Set a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.sql.Date.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setTime

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

  Set a parameter to a java.sql.Time value. The driver converts this to a SQL TIME value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.sql.Time.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setTimestamp

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

  Set a parameter to a java.sql.Timestamp value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=java.sql.Timestamp.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setAsciiStreamWrapper

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

  Set a parameter to a sqlj.runtime.AsciiStream value. The driver converts this to a SQL LONGVARCHAR value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from ASCII to the database char format.

  Note: The AsciiStream class implements java.io.InputStream, and adds a length attribute. The length attribute is used to determine the number of bytes in the stream. The AsciiStream class typically wraps a standard Java stream object or a custom subclass that implements the InputStream interface.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=sqlj.runtime.AsciiStream.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setBinaryStreamWrapper

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

  Set a parameter to a sqlj.runtime.BinaryStream value. The driver converts this to a SQL LONGVARBINARY value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file.

  Note: The BinaryStream class implements java.io.InputStream, and adds a length attribute. The length attribute is used to determine the number of bytes in the stream. The BinaryStream class typically wraps a standard Java stream object or a custom subclass that implements the InputStream interface.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=sqlj.runtime.BinaryStream.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setUnicodeStreamWrapper

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

  Set a parameter to a sqlj.runtime.UnicodeStream value. The driver converts this to a SQL LONGVARCHAR value when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

  Note: The UnicodeStream class implements java.io.InputStream, and adds a length attribute. The length attribute is used to determine the number of bytes in the stream. The UnicodeStream class typically wraps a standard Java stream object or a custom subclass that implements the InputStream interface.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and javaTypeName=sqlj.runtime.UnicodeStream.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

setObject

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

  Set a parameter to a Java object value. The driver uses the type SQL OTHER when it sends it to the database. If the passed value is null, the parameter is set to SQL NULL.

  This method may be used to pass datatabase specific abstract data types, by using a Driver specific Java type.

  Note: This method is used iff the parameter type info at parameterIndex in the profile entry for this statement has mode=IN or INOUT, and SQLType=OTHER. In such cases, the javaTypeName indicates the expected Java Class of the object; the class cannot be handled by any other setXXX method defined by this statement. Accordingly, this method is used as the catch-all for any unrecognized types.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    x - the parameter value
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getParamInfo, getMode, getJavaTypeName

execute

     public abstract boolean execute() throws SQLException

  Some statements return multiple results; the execute method handles these complex statements.

  Note: This method is used iff the execute type of the profile entry for this statement has value EXECUTE.

  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getExecuteType, EXECUTE

getString

     public abstract String getString(int parameterIndex) throws SQLException

  Get the value of a SQL CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.lang.String.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getBytes

     public abstract byte[] getBytes(int parameterIndex) throws SQLException

  Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[].

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=[byte.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getDate

     public abstract Date getDate(int parameterIndex) throws SQLException

  Get the value of a SQL DATE parameter as a java.sql.Date.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.sql.Date.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getTime

     public abstract Time getTime(int parameterIndex) throws SQLException

  Get the value of a SQL TIME parameter as a java.sql.Time.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.sql.Time.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getTimestamp

     public abstract Timestamp getTimestamp(int parameterIndex) throws SQLException

  Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.sql.Timestamp.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getBooleanNoNull

     public abstract boolean getBooleanNoNull(int parameterIndex) throws SQLException

  Get the value of a SQL BIT parameter as a Java boolean.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=boolean.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getByteNoNull

     public abstract byte getByteNoNull(int parameterIndex) throws SQLException

  Get the value of a SQL TINYINT parameter as a Java byte.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=byte.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getShortNoNull

     public abstract short getShortNoNull(int parameterIndex) throws SQLException

  Get the value of a SQL SMALLINT parameter as a Java short.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=short.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getIntNoNull

     public abstract int getIntNoNull(int parameterIndex) throws SQLException

  Get the value of a SQL INTEGER parameter as a Java int.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=int.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getLongNoNull

     public abstract long getLongNoNull(int parameterIndex) throws SQLException

  Get the value of a SQL BIGINT parameter as a Java long.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=long.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getFloatNoNull

     public abstract float getFloatNoNull(int parameterIndex) throws SQLException

  Get the value of a SQL FLOAT parameter as a Java float.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=float.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getDoubleNoNull

     public abstract double getDoubleNoNull(int parameterIndex) throws SQLException

  Get the value of a SQL DOUBLE parameter as a Java double.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=double.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getBooleanWrapper

     public abstract Boolean getBooleanWrapper(int columnIndex) throws SQLException

  Get the value of a SQL BIT parameter as a java.lang.Boolean.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.lang.Boolean.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getByteWrapper

     public abstract Byte getByteWrapper(int columnIndex) throws SQLException

  Get the value of a SQL TINYINT parameter as a java.lang.Byte.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.lang.Byte.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getShortWrapper

     public abstract Short getShortWrapper(int columnIndex) throws SQLException

  Get the value of a SQL SMALLINT parameter as a java.lang.Short.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.lang.Short.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getIntWrapper

     public abstract Integer getIntWrapper(int columnIndex) throws SQLException

  Get the value of a SQL INTEGER parameter as a java.lang.Integer.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.lang.Integer.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getLongWrapper

     public abstract Long getLongWrapper(int columnIndex) throws SQLException

  Get the value of a SQL BIGINT parameter as a java.lang.Long.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.lang.Long.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getFloatWrapper

     public abstract Float getFloatWrapper(int columnIndex) throws SQLException

  Get the value of a SQL FLOAT parameter as a java.lang.Float.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.lang.Float.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getDoubleWrapper

     public abstract Double getDoubleWrapper(int columnIndex) throws SQLException

  Get the value of a SQL DOUBLE parameter as a java.lang.Double.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.lang.Double.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

getObject

     public abstract Object getObject(int columnIndex,
                                      Class objectType) throws SQLException

  Get the value of a parameter as a java.lang.Object. This method is used to read datatabase-specific, abstract data types with type SQL OTHER.

  The static type of the java lvalue into which this parameter value is assigned is passed as @objectType. An exception is raised if the object returned is not assignable to an object with clas @objectType.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and SQLType=OTHER. In such cases, the javaTypeName indicates the expected Java Class of the object; the class cannot be handled by any other getXXX method defined by this statement. Accordingly, this method is used as the catch-all for any unrecognized types.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
    objectType - the class of the java lvalue into which this value will be assigned
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if the class of the object returned is not assignable to the passed objectType class, or a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getSQLType, getJavaTypeName

getBigDecimal

     public abstract BigDecimal getBigDecimal(int columnIndex) throws SQLException

  Get the value of a SQL NUMERIC parameter as a java.math.BigDecimal. Unlike the corresponding JDBC method, this method does not take a scale parameter. The value returned uses the default scale for the given parameter in the database.

  Note: This method is used iff the statement type of the profile entry for this statement has value CALLABLE_STATEMENT and the parameter type info at parameterIndex in the entry has mode=OUT or INOUT, and javaTypeName=java.math.BigDecimal.

  Parameters:
    parameterIndex - the first parameter is 1, the second is 2, ...
  Returns:
    the parameter value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getStatementType, CALLABLE_STATEMENT, getMode, getJavaTypeName

executeComplete

     public abstract 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 by the codegen or runtime environment. Once executeComplete has been called, further calls to any other method are undefined and may result in a SQLException.

  This method is distinguished from the JDBC close method because unlike the JDBC close method, this method will not close any ResultSets that have been opened by this statement. If this statement is implemented using JDBC, the underlying statement should not be closed until all open ResultSets have been explicitely closed, and the executionComplete method has been called.

  Throws: SQLException
    if a database-access error occurs.

    All Packages    This Package  Previous  Next