All Packages    This Package  Previous  Next  

Interface sqlj.runtime.profile.RTStatement

public 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:


Method Index

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

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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, and made avaiable to the client on the associated iterator.

Returns:
the first SQLWarning or null
Throws: SQLException
if a database-access error occurs.
 o 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.
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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