All Packages    This Package  Previous  Next  

Class sqlj.runtime.profile.ref.RTStatementJDBCCallable

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

public class RTStatementJDBCCallable
extends RTStatementJDBCBase
implements RTCallableStatement
This class implements the RTStatement interface using a JDBC callable statement. The superclass RTStatementJDBCBase handles all prepared statement related calls.

See Also:
getStatementType

Variable Index

 o callableStmt
The underlying JDBC callable statement with which this class is implemented

Constructor Index

 o RTStatementJDBCCallable(CallableStatement)
Creates a new statement object that uses the passed CallableStatement to implement its methods.

Method Index

 o checkObjectClass(Object, Class)
Verifies that the passed object can be assigned to an argument having the passed expected class type.
 o getBigDecimal(int)
Fetches a BigDecimal from the underlying statement using getObject.
 o getBooleanNoNull(int)
Fetches the result using the getBoolean method of the underlying statement.
 o getBooleanWrapper(int)
Fetches a primitive type using the getBoolean method of the underlying statement.
 o getByteNoNull(int)
Fetches the result using the getByte method of the underlying statement.
 o getBytes(int)
Returns the result of calling the getBytes method on the underlying callable statement.
 o getByteWrapper(int)
Fetches a primitive type using the getByte method of the underlying statement.
 o getDate(int)
Returns the result of calling the getDate method on the underlying callable statement.
 o getDoubleNoNull(int)
Fetches the result using the getDouble method of the underlying statement.
 o getDoubleWrapper(int)
Fetches a primitive type using the getDouble method of the underlying statement.
 o getFloatNoNull(int)
Fetches the result using the getFloat method of the underlying statement.
 o getFloatWrapper(int)
Fetches a primitive type using the getFloat method of the underlying statement.
 o getIntNoNull(int)
Fetches the result using the getInt method of the underlying statement.
 o getIntWrapper(int)
Fetches a primitive type using the getInt method of the underlying statement.
 o getJDBCCallableStatement()
Returns the underlying callable statement with which this object was created.
 o getLongNoNull(int)
Fetches the result using the getLong method of the underlying statement.
 o getLongWrapper(int)
Fetches a primitive type using the getLong method of the underlying statement.
 o getObject(int, Class)
Fetches the object from the underlying statement using getObject.
 o getShortNoNull(int)
Fetches the result using the getShort method of the underlying statement.
 o getShortWrapper(int)
Fetches a primitive type using the getShort method of the underlying statement.
 o getString(int)
Returns the result of calling the getString method on the underlying callable statement.
 o getTime(int)
Returns the result of calling the getTime method on the underlying callable statement.
 o getTimestamp(int)
Returns the result of calling the getTimestamp method on the underlying callable statement.
 o registerOutParameter(int, int)
Calls registerOutParameter on the underlying callable statement.

Variables

 o callableStmt
 protected CallableStatement callableStmt
The underlying JDBC callable statement with which this class is implemented

Constructors

 o RTStatementJDBCCallable
 public RTStatementJDBCCallable(CallableStatement callableStmt)
Creates a new statement object that uses the passed CallableStatement to implement its methods.

Parameters:
callableStmt - the underlying JDBC callable statement

Methods

 o getJDBCCallableStatement
 public CallableStatement getJDBCCallableStatement()
Returns the underlying callable statement with which this object was created. Note that unlike RTStatement, this method does not throw an exception since it always has a callable statement object.

 o registerOutParameter
 public void registerOutParameter(int paramIndex,
                                  int sqlType) throws SQLException
Calls registerOutParameter on the underlying callable statement.

Throws: SQLException
if an error occurs during the call.
 o getString
 public String getString(int parameterIndex) throws SQLException
Returns the result of calling the getString method on the underlying callable statement.

Throws: SQLException
if an error is raised by the wrapped statement
 o getBytes
 public byte[] getBytes(int parameterIndex) throws SQLException
Returns the result of calling the getBytes method on the underlying callable statement.

Throws: SQLException
if an error is raised by the wrapped statement
 o getDate
 public Date getDate(int parameterIndex) throws SQLException
Returns the result of calling the getDate method on the underlying callable statement.

Throws: SQLException
if an error is raised by the wrapped statement
 o getTime
 public Time getTime(int parameterIndex) throws SQLException
Returns the result of calling the getTime method on the underlying callable statement.

Throws: SQLException
if an error is raised by the wrapped statement
 o getTimestamp
 public Timestamp getTimestamp(int parameterIndex) throws SQLException
Returns the result of calling the getTimestamp method on the underlying callable statement.

Throws: SQLException
if an error is raised by the wrapped statement
 o getBooleanNoNull
 public boolean getBooleanNoNull(int parameterIndex) throws SQLException
Fetches the result using the getBoolean method of the underlying statement. If a subsequent call to wasNull returns true, a SQLNullException is raised. Otherwise the result is returned.

Throws: SQLNullException
if the parameter is null
Throws: SQLException
if an error occurs in the underlying statement
 o getByteNoNull
 public byte getByteNoNull(int parameterIndex) throws SQLException
Fetches the result using the getByte method of the underlying statement. If a subsequent call to wasNull returns true, a SQLNullException is raised. Otherwise the result is returned.

Throws: SQLNullException
if the parameter is null
Throws: SQLException
if an error occurs in the underlying statement
 o getShortNoNull
 public short getShortNoNull(int parameterIndex) throws SQLException
Fetches the result using the getShort method of the underlying statement. If a subsequent call to wasNull returns true, a SQLNullException is raised. Otherwise the result is returned.

Throws: SQLNullException
if the parameter is null
Throws: SQLException
if an error occurs in the underlying statement
 o getIntNoNull
 public int getIntNoNull(int parameterIndex) throws SQLException
Fetches the result using the getInt method of the underlying statement. If a subsequent call to wasNull returns true, a SQLNullException is raised. Otherwise the result is returned.

Throws: SQLNullException
if the parameter is null
Throws: SQLException
if an error occurs in the underlying statement
 o getLongNoNull
 public long getLongNoNull(int parameterIndex) throws SQLException
Fetches the result using the getLong method of the underlying statement. If a subsequent call to wasNull returns true, a SQLNullException is raised. Otherwise the result is returned.

Throws: SQLNullException
if the parameter is null
Throws: SQLException
if an error occurs in the underlying statement
 o getFloatNoNull
 public float getFloatNoNull(int parameterIndex) throws SQLException
Fetches the result using the getFloat method of the underlying statement. If a subsequent call to wasNull returns true, a SQLNullException is raised. Otherwise the result is returned.

Throws: SQLNullException
if the parameter is null
Throws: SQLException
if an error occurs in the underlying statement
 o getDoubleNoNull
 public double getDoubleNoNull(int parameterIndex) throws SQLException
Fetches the result using the getDouble method of the underlying statement. If a subsequent call to wasNull returns true, a SQLNullException is raised. Otherwise the result is returned.

Throws: SQLNullException
if the parameter is null
Throws: SQLException
if an error occurs in the underlying statement
 o getBooleanWrapper
 public Boolean getBooleanWrapper(int columnIndex) throws SQLException
Fetches a primitive type using the getBoolean method of the underlying statement. If a subsequent call to wasNull returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

Throws: SQLException
if an error occurs in the underlying statement
 o getByteWrapper
 public Byte getByteWrapper(int columnIndex) throws SQLException
Fetches a primitive type using the getByte method of the underlying statement. If a subsequent call to wasNull returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

Throws: SQLException
if an error occurs in the underlying statement
 o getShortWrapper
 public Short getShortWrapper(int columnIndex) throws SQLException
Fetches a primitive type using the getShort method of the underlying statement. If a subsequent call to wasNull returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

Throws: SQLException
if an error occurs in the underlying statement
 o getIntWrapper
 public Integer getIntWrapper(int columnIndex) throws SQLException
Fetches a primitive type using the getInt method of the underlying statement. If a subsequent call to wasNull returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

Throws: SQLException
if an error occurs in the underlying statement
 o getLongWrapper
 public Long getLongWrapper(int columnIndex) throws SQLException
Fetches a primitive type using the getLong method of the underlying statement. If a subsequent call to wasNull returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

Throws: SQLException
if an error occurs in the underlying statement
 o getFloatWrapper
 public Float getFloatWrapper(int columnIndex) throws SQLException
Fetches a primitive type using the getFloat method of the underlying statement. If a subsequent call to wasNull returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

Throws: SQLException
if an error occurs in the underlying statement
 o getDoubleWrapper
 public Double getDoubleWrapper(int columnIndex) throws SQLException
Fetches a primitive type using the getDouble method of the underlying statement. If a subsequent call to wasNull returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

Throws: SQLException
if an error occurs in the underlying statement
 o getObject
 public Object getObject(int columnIndex,
                         Class objectType) throws SQLException
Fetches the object from the underlying statement using getObject. Verifies that the object fetched can be assigned to an argument having the passed class object type.

Throws: SQLException
if an error occurs in the underlying statement, or the object has an incompatible type
See Also:
checkObjectClass
 o checkObjectClass
 public static void checkObjectClass(Object object,
                                     Class expectedType) throws SQLException
Verifies that the passed object can be assigned to an argument having the passed expected class type. This is provided as a convenience for uniform error reporting in subclasses overriding the getObject method.

If the passed object is null, no exception is raised.

Parameters:
object - the object to check
expectedType - the class with which the object must be compatible
Throws: SQLException
if the object has an incompatible type
 o getBigDecimal
 public BigDecimal getBigDecimal(int columnIndex) throws SQLException
Fetches a BigDecimal from the underlying statement using getObject.

Throws: SQLException
if an error occurs in the underlying statement, or the object has an incompatible type

All Packages    This Package  Previous  Next