# package sqlj.runtime.profile

## Interface Index

- ConnectedProfile
- Customization
- Loader
- RTResultSet
- RTStatement
- SerializedProfile

## Class Index

- DefaultLoader
- EntryInfo
- Profile
- ProfileData
- SetTransactionDescriptor
- TypeInfo
Interface sqlj.runtime.profile.ConnectedProfile

# Interface sqlj.runtime.profile.ConnectedProfile

public interface ConnectedProfile

A ConnectedProfile object represents a profile which has been attached to a particular jdbc connection. Since it is attached to a connection, it is able to convert its contents into an executable statement object on the associated connection. The implementation of this object may be customized for the given data source, which allows it use to optimizations that circumvent the jdbc dynamic sql model. Profile customization will typically involve vendor-specific profile transformations that allow more efficient sql execution such a precompilation of sql text or use of stored procedures.

A connected profile creates statements which correspond to entries at a particular index in the profile. The profile entry info at a particular index can be used to determine how the corresponding statement returned by a connected profile will be executed at runtime. The statement returned need only respond to the execute method indicated in the entry info.

The profile entry info at a particular index also characterizes the statement type. A statement can be either PREPARED or CALLABLE, the difference between the two being that CALLABLE statements may have out-parameters whereas PREPARED statements will have only in-parameters.

All statements returned by a connected profile conforms to the following requirements:

- The operation performed must be equivalent to the operation which would have been performed if using regular jdbc and the text of the sql statement directly.
- Any out-parameters of the operation must have been already registered in the statement returned (CALLABLE statements only). The profile describes each parameter to the operation in terms of its Java class description. It is up to the implementation to properly register the sql type for this class description as needed for the particular jdbc (or vendor-specific) driver used.

If the connected profile is unable to create the desired statement, an exception is raised. Note that a particular profile customization might employ an eager verification model in which all entries in the profile are verified against the connection when a connected profile is created, or a lazy verification algorithm in which statements are not verified until they are indexed via this method. It is up to the implementation of a customization and connected profile to decide upon an appropriate verification strategy.

See Also:
  getStatementType, CALLABLE_STATEMENT, PREPARED_STATEMENT, getExecuteType

## Method Index

o close()
  Closes this connected profile instance, releasing any resources associated with it.
o getConnection()
o getProfileData()
  Returns the handle to the profile data object associated with this connected profile.
o getStatement(int)
  Returns a statement object representing the entry at index "ndx" in the profile, where "ndx" is 0 based.

## Methods

o getProfileData

     public abstract ProfileData getProfileData()

  Returns the handle to the profile data object associated with this connected profile. The top level profile which created this connected profile can be retrieved by calling the `getProfile` method on the resulting profile data object.

  See Also:
    getConnectedProfile, getProfile

o getConnection

     public abstract Connection getConnection()

  Returns:
    the connection with which this profile was created
  See Also:
    getConnectedProfile

o getStatement

     public abstract RTStatement getStatement(int ndx) throws SQLException

  Returns a statement object representing the entry at index "ndx" in the profile, where "ndx" is 0 based.

  Parameters:
    ndx - the index of the statement to return, 0 based.
  Throws: SQLException
    if an error occurs preparing the statement.

o close

     public abstract void close() throws SQLException

  Closes this connected profile instance, releasing any resources associated with it. This is called when the ConnectionContext asscoiated with the Profile is closed.

  Throws: SQLException
    if an error occurs while closing.

Interface sqlj.runtime.profile.Customization

# Interface sqlj.runtime.profile.Customization

public interface Customization
extends Serializable

A profile Customization is a serializable object which maps a particular jdbc connection and basic profile into a customized connected profile. Because both profiles and customizations are serializable, new customizations may be added to profiles as needed anytime after the profile has been created. This will most often happen during an "installation" phase after the application has been translated, but before the application is actually run.

Profiles may be customized in any number of ways. Some typical examples are listed.

- Transformation of sql text into a format which allows more efficient execution on a particular data source. Precompilation and use of stored procedures are examples of this.
- Batch verification and/or preparation of profile entries to avoid mutliple data source round trips.
- Distributed and/or remote loading of custom entries.
- Custom type registration of data source specific entry parameters.
- Behavioral unification of multiple JDBC drivers with which an application is to be deployed.

See Also:
  Profile

## Method Index

o acceptsConnection(Connection)
  Returns true if this customization can create a connected profile instance for the given jdbc connection, false otherwise.
o getProfile(Connection, Profile)
  Returns a connected profile for the baseProfile on the given jdbc connection.

## Methods

o acceptsConnection

     public abstract boolean acceptsConnection(Connection conn)

  Returns true if this customization can create a connected profile instance for the given jdbc connection, false otherwise.

o getProfile

     public abstract ConnectedProfile getProfile(Connection conn,
                                                 Profile baseProfile) throws SQLException

  Returns a connected profile for the baseProfile on the given jdbc connection. If the profile cannot be connected, an exception is raised. The exception may be the result of the base profile containing entries which cannot be prepared and executed on the particular connection. Depending on the implementation of the customization, verification of profile entries may occur when the profile is connected, or be deferred until an entry is directly accessed by the client.

  Throws: SQLException
    if the profile cannot be connected.

Interface sqlj.runtime.profile.Loader

# Interface sqlj.runtime.profile.Loader

public interface Loader

A profile loader object is used as the context for profile instantiation rather than a java class loader object. This allows flexibility to runtime environments in which class loaders may not be properly defined for all classes, and resource names would not otherwise be able to be resolved.

See Also:
  DefaultLoader

## Method Index

o getResourceAsStream(String)
  Get an InputStream on a given resource.
o loadClass(String)
  Requests the loader to load a class with the specified name.

## Methods

o loadClass

     public abstract Class loadClass(String className) throws ClassNotFoundException

  Requests the loader to load a class with the specified name. The loadClass method is called when a profile is instantiated and when a profile attempts to find the java class of a type info object for the first time.

  Loaders should use a hashtable or other cache to avoid defining classes with the same name multiple times.

  Parameters:
    name - the fully qualified name of the desired Class
  Returns:
    the resulting Class
  Throws: ClassNotFoundException
    if the loader cannot find a definition for the class
  See Also:
    instantiate, getJavaType

o getResourceAsStream

     public abstract InputStream getResourceAsStream(String name)

  Get an InputStream on a given resource. Will return null if no resource with this name is found. This method is called when instantiating serialized profiles.

  The loader can choose what to do to locate the resource.

  Parameters:
    name - the name of the resource, to be used as is.
  Returns:
    an InputStream on the resource, or null if not found.
  See Also:
    instantiate

Interface sqlj.runtime.profile.RTResultSet

# Interface sqlj.runtime.profile.RTResultSet

public interface RTResultSet

This interface defines the operations used for accessing result set data produced by the execution of a SQL query described by a profile entry. It is based strongly on the JDBC ResultSet interface, and can be implemented using a JDBC result set. In general, any method with the same name as one of those in the JDBC ResultSet interface 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 ResultSet interface. The primary difference between this interface and the JDBC ResultSet interfaces is the addition of getter methods that throw exceptions on fetch of null primitives, and the omission of named getters and result set meta data.

By partitioning new methods into a different namespace, it is possible for a JDBC driver to implement both the JDBC ResultSet interface 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 ResultSet interface and the methods of this interface.

Methods kept from java.sql.ResultSet
next() |
close() |
getBytes(int) |
getCursorName() |
getDate(int) |
getTime(int) |
getTimestamp(int) |
getString(int) |
findColumn() |

Methods not included from java.sql.ResultSet
Method Removed | Replacement Method
--- | ---
getMetaData() |
getWarnings() |
clearWarnings() |
getBoolean(int) getBoolean(String) | getBooleanNoNull(int)
getByte(int) getByte(String) | getByteNoNull(int)
getShort(int) getShort(String) | getShortNoNull(int)
getInt(int) getInt(String) | getIntNoNull(int)
getLong(int) getLong(String) | getLongNoNull(int)
getFloat(int) getFloat(String) | getFloatNoNull(int)
getDouble(int) getDouble(String) | getDoubleNoNull(int)
getObject(int) getObject(String) | getObject(int, Class)
wasNull(int) | getBooleanWrapper(int) getByteWrapper(int) getShortWrapper(int) getIntWrapper(int) getLongWrapper(int) getFloatWrapper(int) getDoubleWrapper(int)
getBigDecimal(int,int) getBigDecimal(String,int) | getBigDecimal(int)
getAsciiStream(int) getAsciiStream(String) | getAsciiStreamWrapper(int)
getBinaryStream(int) getBinaryStream(String) | getBinaryStreamWrapper(int)
getUnicodeStream(int) getUnicodeStream(String) | getUnicodeStreamWrapper(int)
getString(String) |
getBytes(String) |
getDate(String) |
getTime(String) |
getTimestamp(String) |

Additional methods unique to RTResultSet
| getJDBCResultSet()
| isValidRow()
| getColumnCount()
| isClosed()

Additional notes:

- The getXXX(String) methods were omitted because int-based column lookup is generally more efficient. Moreover, when columns must be looked by name, the `findColumn` method is used to find and cache the appropriate index before any getXXX calls are made.

## Method Index

o close()
  The close method provides an immediate release of a ResultSet's database and runtime resources instead of waiting for this to happen when it is automatically garbage collected.
o findColumn(String)
  Map a Resultset column name to a ResultSet column index.
o getAsciiStreamWrapper(int)
  Get the value of a column in the current row as a sqlj.runtime.AsciiStream object.
o getBigDecimal(int)
  Get the value of a column in the current row as a java.math.BigDecimal object.
o getBinaryStreamWrapper(int)
  Get the value of a column in the current row as a sqlj.runtime.BinaryStream object.
o getBooleanNoNull(int)
  Get the value of a column in the current row as a Java boolean.
o getBooleanWrapper(int)
  Get the value of a column in the current row as a java.lang.Boolean object.
o getByteNoNull(int)
  Get the value of a column in the current row as a Java byte.
o getBytes(int)
  Get the value of a column in the current row as a Java byte[].
o getByteWrapper(int)
  Get the value of a column in the current row as a java.lang.Byte object.
o getColumnCount()
  Determine the number of columns in this result set.
o getCursorName()
  Get the name of the SQL cursor used by this ResultSet.
o getDate(int)
  Get the value of a column in the current row as a java.sql.Date object.
o getDoubleNoNull(int)
  Get the value of a column in the current row as a Java double.
o getDoubleWrapper(int)
  Get the value of a column in the current row as a java.lang.Double object.
o getFloatNoNull(int)
  Get the value of a column in the current row as a Java float.
o getFloatWrapper(int)
  Get the value of a column in the current row as a java.lang.Float object.
o getIntNoNull(int)
  Get the value of a column in the current row as a Java int.
o getIntWrapper(int)
  Get the value of a column in the current row as a java.lang.Integer object.
o getJDBCResultSet()
  Returns the JDBC result set associated with this iterator.
o getLongNoNull(int)
  Get the value of a column in the current row as a Java long.
o getLongWrapper(int)
  Get the value of a column in the current row as a java.lang.Long object.
o getObject(int, Class)
  Get the value of a column in the current row as a java.lang.Object.
o getShortNoNull(int)
  Get the value of a column in the current row as a Java short.
o getShortWrapper(int)
  Get the value of a column in the current row as a java.lang.Short object.
o getString(int)
  Get the value of a column in the current row as a Java String.
o getTime(int)
  Get the value of a column in the current row as a java.sql.Time object.
o getTimestamp(int)
  Get the value of a column in the current row as a java.sql.Timestamp object.
o getUnicodeStreamWrapper(int)
  Get the value of a column in the current row as a sqlj.runtime.UnicodeStream object.
o isClosed()
  Tests to see if this result set is closed.
o isValidRow()
  Returns true if the result set is currently positioned on a row, false otherwise.
o next()
  A ResultSet is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc.

## Methods

o getJDBCResultSet

     public abstract ResultSet getJDBCResultSet() throws SQLException

  Returns the JDBC result set associated with this iterator. The result set produced must have normal JDBC functionality, as defined in the JDBC specification (in particular, SQL NULL values fetched with primitive accessor methods will not raise a SQLNullException). This method is provided to facilitate interoperablity with JDBC.

  Notes:

  - Support for this method is implementor defined and not part of Core SQLJ. An SQLException will be thrown if this method is not supported.
  - If an implementor supports this method, then any synchronization between the iterator and the produced result set is implementor defined.
  - For maximum portability this method should be invoked before the first `next` method invocation on the iterator. Once the result set has been produced, all operations to fetch data should be through the result set.

  Returns:
    a JDBC result set representing this object.
  Throws: SQLException
    if this object cannot be represented as a JDBC result set.

o next

     public abstract boolean next() throws SQLException

  A ResultSet is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc.

  If an input stream from the previous row is open, it is implicitly closed.

  Returns:
    true if the new current row is valid; false if there are no more rows
  Throws: SQLException
    if a database-access error occurs.

o getCursorName

     public abstract String getCursorName() throws SQLException

  Get the name of the SQL cursor used by this ResultSet.

  In SQL, a result table is retrieved through a cursor that is named. The current row of a result can be updated or deleted using a positioned update/delete statement that references the cursor name.

  JDBC drivers support this SQL feature by providing the name of the SQL cursor used by a ResultSet. The current row of a ResultSet is also the current row of this SQL cursor. This method is provided for interoperability with JDBC-based implementations.

  Note: If positioned update is not supported a SQLException is thrown

  Note: This method is called only if the profile entry for the statement which produced this result set has a role with value POSITIONED.

  Returns:
    the ResultSet's SQL cursor name
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getRole, POSITIONED

o findColumn

     public abstract int findColumn(String columnName) throws SQLException

  Map a Resultset column name to a ResultSet column index. The index of the first column whose name is a case insensitive match of the passed columnName is returned. If no such column is found, an SQLException is raised.

  Note: This method is called iff the profile entry for the statement which produced this result set has a result set type with value NAMED_RESULT.

  Parameters:
    columnName - the name of the column
  Returns:
    the column index
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, NAMED_RESULT

o getString

     public abstract String getString(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java String.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.String. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getBytes

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

  Get the value of a column in the current row as a Java byte[].

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=[byte. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getDate

     public abstract Date getDate(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.sql.Date object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.sql.Date. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getTime

     public abstract Time getTime(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.sql.Time object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.sql.Time. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getTimestamp

     public abstract Timestamp getTimestamp(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.sql.Timestamp object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.sql.Timestamp. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getBooleanWrapper

     public abstract Boolean getBooleanWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Boolean object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Boolean. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getByteWrapper

     public abstract Byte getByteWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Byte object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Byte. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getShortWrapper

     public abstract Short getShortWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Short object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Short. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getIntWrapper

     public abstract Integer getIntWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Integer object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Integer. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getLongWrapper

     public abstract Long getLongWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Long object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Long. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getFloatWrapper

     public abstract Float getFloatWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Float object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Float. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getDoubleWrapper

     public abstract Double getDoubleWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Double object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Double. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getBooleanNoNull

     public abstract boolean getBooleanNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java boolean.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=boolean. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getByteNoNull

     public abstract byte getByteNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java byte.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=byte. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getShortNoNull

     public abstract short getShortNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java short.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=short. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getIntNoNull

     public abstract int getIntNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java int.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=int. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getLongNoNull

     public abstract long getLongNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java long.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=long. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getFloatNoNull

     public abstract float getFloatNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java float.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=float. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getDoubleNoNull

     public abstract double getDoubleNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java double.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=double. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getAsciiStreamWrapper

     public abstract AsciiStream getAsciiStreamWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a sqlj.runtime.AsciiStream object. A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The driver will do any necessary conversion from the database format into ASCII.

  Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=sqlj.runtime.AsciiStream. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    a Java input stream that delivers the database column value as a stream of one byte ASCII characters. If the value is SQL NULL then the result is null.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getUnicodeStreamWrapper

     public abstract UnicodeStream getUnicodeStreamWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a sqlj.runtime.UnicodeStream object. A column value can be retrieved as a stream of UNICODE characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The driver will do any necessary conversion from the database format into UNICODE.

  Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=sqlj.runtime.UnicodeStream. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    a Java input stream that delivers the database column value as a stream of two byte UNICODE characters. If the value is SQL NULL then the result is null.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getBinaryStreamWrapper

     public abstract BinaryStream getBinaryStreamWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a sqlj.runtime.BinaryStream object. A column value can be retrieved as a stream of uninterpreted bytes and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values.

  Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=sqlj.runtime.BinaryStream. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    a Java input stream that delivers the database column value as a stream of uninterpreted byte binary characters. If the value is SQL NULL then the result is null.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getObject

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

  Get the value of a column in the current row 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 class "objectType".

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has 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. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
    objectType - the class of the java lvalue into which this value will be assigned
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getBigDecimal

     public abstract BigDecimal getBigDecimal(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.math.BigDecimal object. Unike the corresponding JDBC method, this method does not take a scale parameter. The value returned uses the default scale for the given column in the database.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.math.BigDecimal. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

o getColumnCount

     public abstract int getColumnCount() throws SQLException

  Determine the number of columns in this result set. This is used to verify that the number of columns in the result set match the number expected by a strongly typed iterator object.

  Note: This method can be implemented in JDBC using the `getColumnCount` method of a ResultSet's MetaData object.

  Returns:
    the number
  Throws: SQLException
    if a database-access error occurs.

o isValidRow

     public abstract boolean isValidRow() throws SQLException

  Returns true if the result set is currently positioned on a row, false otherwise. In particular, false is returned if the result set is currently positioned before the first row, or after the last row.

  Returns:
    true iff the result set is positioned on a row.
  Throws: SQLException
    if a database-access error occurs.

o isClosed

     public abstract boolean isClosed() throws SQLException

  Tests to see if this result set is closed.

  Returns:
    true if the result set is closed; false if it's still open
  Throws: SQLException
    if a database-access error occurs.

o close

     public abstract void close() throws SQLException

  The close method provides an immediate release of a ResultSet's database and runtime resources instead of waiting for this to happen when it is automatically garbage collected.

  Note: A ResultSet is automatically closed by the Statement that generated it when that Statement is used to retrieve the next result from a sequence of multiple results. The generating statement can only release its underlying resources when its result set has been closed. A ResultSet is also automatically closed when it is garbage collected.

  Throws: SQLException
    if a database-access error occurs.

Interface sqlj.runtime.profile.RTStatement

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

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

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

  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.

Interface sqlj.runtime.profile.SerializedProfile

# Interface sqlj.runtime.profile.SerializedProfile

public interface SerializedProfile

A class implementing the serialized profile interface is able to provide an input stream from which a serialized profile instance may be read. Instances of serialized profile may be loaded and used by the Profile.instantiate() method. This object provides a hook by which profiles may be loaded by non-standard means.

As an example of where this was found useful, it was discovered that a particular version of a web browser did not support loading of a serialized object as an applet resource. In this case, the serialized profile was encoded as a static string on a class implementing serialized profile, and the class packaged with the applet in place of the original serialized profile.

See Also:
  instantiate

## Method Index

o getProfileAsStream()
  Returns an input stream from which a serialized profile object may be read.

## Methods

o getProfileAsStream

     public abstract InputStream getProfileAsStream() throws IOException

  Returns an input stream from which a serialized profile object may be read. The first object on the stream returned is expected to be a serialized profile instance.

  Returns:
    an input stream containing a serialized profile.
  Throws: IOException
    if the stream could not be created

Class sqlj.runtime.profile.DefaultLoader

# Class sqlj.runtime.profile.DefaultLoader

    java.lang.Object
       |
       +----sqlj.runtime.profile.DefaultLoader

public class DefaultLoader
extends Object
implements Loader

The default profile loader implementation. The default profile loader implements the loader interface by deferring to a wrapped class loader argument.

## Constructor Index

o DefaultLoader(ClassLoader)
  Creates a default profile loader whose implementation will defer to the passed class loader.

## Method Index

o getResourceAsStream(String)
  Creates the named resource as an input stream using the underlying class loader's `getResourceAsStream` method, or `ClassLoader.getSystemResourceAsStream` if the underlying class loader is null.
o loadClass(String)
  Loads the given class using the underlying class loader's `loadClass` method, or `Class.forName` if the underlying class loader is null.

## Constructors

o DefaultLoader

     public DefaultLoader(ClassLoader loader)

  Creates a default profile loader whose implementation will defer to the passed class loader. If the passed loader is null, the system loader will be used instead.

  Parameters:
    the - class loader to use for loading classes and resources, or null if system class loader should be used.

## Methods

o loadClass

     public Class loadClass(String className) throws ClassNotFoundException

  Loads the given class using the underlying class loader's `loadClass` method, or `Class.forName` if the underlying class loader is null.

  Parameters:
    name - the fully qualified name of the desired Class
  Returns:
    the resulting Class
  Throws: ClassNotFoundException
    if the underlying loader cannot find a definition for the class
  See Also:
    loadClass, loadClass, forName

o getResourceAsStream

     public InputStream getResourceAsStream(String name)

  Creates the named resource as an input stream using the underlying class loader's `getResourceAsStream` method, or `ClassLoader.getSystemResourceAsStream` if the underlying class loader is null.

  Parameters:
    name - the name of the resource, to be used as is.
  Returns:
    an InputStream on the resource, or null if not found.
  See Also:
    getResourceAsStream, getResourceAsStream, getSystemResourceAsStream

Class sqlj.runtime.profile.EntryInfo

# Class sqlj.runtime.profile.EntryInfo

    java.lang.Object
       |
       +----sqlj.runtime.profile.EntryInfo

public abstract class EntryInfo
extends Object
implements Serializable, ObjectInputValidation

A profile EntryInfo object contains the constant information describing a static sql operation constructed at translation time, including the sql string in JDBC format, the return type of the operation, the types of each bind parameter, and the way in which the operation is to be executed at runtime.

## Variable Index

o BLOCK
  Constant returned by `getRole` indicating that the operation is a BEGIN..END block.
o CALL
  Constant returned by `getRole` indicating the operation is a call to a stored procedure.
o CALLABLE_STATEMENT
  Constant returned by `getStatementType` indicating that the runtime statements associated with this entry may include out-parameters (and calls to getXXX methods).
o COMMIT
  Constant returned by `getRole` indicating that the operation is a COMMIT statement.
o EXECUTE
  Constant returned by `getExecuteType` indicating that the runtime statements associated with this entry will be executed via the `execute()` method.
o EXECUTE_QUERY
  Constant returned by `getExecuteType` indicating that the runtime statements associated with this entry will be executed via the `executeRTQuery()` method.
o EXECUTE_UPDATE
  Constant returned by `getExecuteType` indicating that the runtime statements associated with this entry will be executed via the `executeUpdate()` method.
o NAMED_RESULT
  Constant returned by `getResultSetType` indicating that this entry produces a result set whose columns will be bound by name to the columns in this operation.
o NO_RESULT
  Constant returned by `getResultSetType` indicating that this entry does not produce a result set.
o OTHER
  Constant returned by `getRole` indicating that the operation cannot be categorized by any of the other constant roles returned by `getRole`.
o POSITIONED
  Constant returned by `getRole` indicating that the operation contains a "WHERE CURRENT OF" clause (positioned update or delete, for example).
o POSITIONED_RESULT
  Constant returned by `getResultSetType` indicating that this entry produces a result set whose columns will be bound by position to the columns in this operation.
o PREPARED_STATEMENT
  Constant returned by `getStatementType` indicating that the runtime statements associated with this entry do not have any out-parameters.
o QUERY
  Constant returned by `getRole` indicating the operation is a SELECT statement.
o QUERY_FOR_UPDATE
  Constant returned by `getRole` indicating that the operation produces a result set which will later be used in a positioned update.
o ROLLBACK
  Constant returned by `getRole` indicating that the operation is a ROLLBACK statement.
o SET_TRANSACTION
  Constant returned by `getRole` indicating that the operation is a SET TRANSACTION statement.
o SINGLE_ROW_QUERY
  Constant returned by `getRole` indicating that the operation produces a result set which is expected to contain a single row.
o STATEMENT
  Constant returned by `getRole` indicating the operation is a general SQL statement not categorized by other roles (e.g., DML, DDL, etc).
o VALUES
  Constant returned by `getRole` indicating the operation is a call to a stored function.

## Constructor Index

o EntryInfo()

## Method Index

o executeTypeToString(int)
  Returns a string representation of an execute type constant.
o getDescriptor()
  Returns an object which describes any additional information particular to this entry.
o getExecuteType()
  Describes the way in which the all executable statement objects associated with this entry will be executed at runtime.
o getLineNumber()
  Returns the starting line number of the operation represented by this entry.
o getParamCount()
o getParamInfo(int)
o getResultSetCount()
  Returns the number of columns in the result set produced by this entry, which is always non-negative.
o getResultSetInfo(int)
  Returns a description of the result set column at index "ndx".
o getResultSetName()
  Returns the name of the Java Class associated with the strongly typed result set populated by this entry.
o getResultSetType()
  Describes the type of result set that is produced by this operation, if any.
o getRole()
  Returns the role of the operation to be executed.
o getSQLString()
  Returns the text of the operation to be performed in JDBC format.
o getStatementType()
  Describes the type of statement.
o getTransactionDescriptor()
  If this entry is a SET TRANSACTION statement, a descriptor is returned that contains the access mode and isolation level of the statement.
o isDefinedRole(int)
  Returns true if the passed int parameter represents a defined role, false otherwise.
o isValidDescriptor(Object, int)
  Returns true if the passed descriptor is of valid type (and value) for an entry which has the given role, false otherwise.
o isValidExecuteType(int)
  Returns true if the passed int parameter represents a valid execute type, false otherwise.
o isValidResultSetType(int)
  Returns true if the passed int parameter represents a valid result set type, false otherwise.
o isValidRole(int)
  Returns true if the passed int parameter represents a valid role, false otherwise.
o isValidStatementType(int)
  Returns true if the passed int parameter represents a valid statement type, false otherwise.
o resultSetTypeToString(int)
  Returns a string representation of a result set type constant.
o roleToString(int)
  Returns a string representation of a role constant.
o statementTypeToString(int)
  Returns a string representation of a statement type constant.
o validateObject()
  Performs validation on the internal state of this entry info object.

## Variables

o PREPARED_STATEMENT

     public static final int PREPARED_STATEMENT

  Constant returned by `getStatementType` indicating that the runtime statements associated with this entry do not have any out-parameters. The runtime statements associated with this entry will not expect any getXXX calls to be made.

  See Also:
    getStatementType

o CALLABLE_STATEMENT

     public static final int CALLABLE_STATEMENT

  Constant returned by `getStatementType` indicating that the runtime statements associated with this entry may include out-parameters (and calls to getXXX methods).

  See Also:
    getStatementType

o EXECUTE_UPDATE

     public static final int EXECUTE_UPDATE

  Constant returned by `getExecuteType` indicating that the runtime statements associated with this entry will be executed via the `executeUpdate()` method. Such statements return no result set, and thus have no result set info in this entry.

  See Also:
    executeUpdate, getExecuteType

o EXECUTE_QUERY

     public static final int EXECUTE_QUERY

  Constant returned by `getExecuteType` indicating that the runtime statements associated with this entry will be executed via the `executeRTQuery()` method. Such statements always return a result set which is described by the `getResultSetInfo` method of this entry.

  See Also:
    executeRTQuery, getResultSetInfo, getExecuteType

o EXECUTE

     public static final int EXECUTE

  Constant returned by `getExecuteType` indicating that the runtime statements associated with this entry will be executed via the `execute()` method. This constant is used only when the runtime will dynamically determine whether or not an operation returns a result set. An entry of this type is expected to be rare since most static SQL environments should be able to deduce whether an operation will return a result set or not.

  See Also:
    execute, getExecuteType

o QUERY

     public static final int QUERY

  Constant returned by `getRole` indicating the operation is a SELECT statement.

  See Also:
    getRole

o STATEMENT

     public static final int STATEMENT

  Constant returned by `getRole` indicating the operation is a general SQL statement not categorized by other roles (e.g., DML, DDL, etc).

  See Also:
    getRole

o CALL

     public static final int CALL

  Constant returned by `getRole` indicating the operation is a call to a stored procedure.

  See Also:
    getRole

o VALUES

     public static final int VALUES

  Constant returned by `getRole` indicating the operation is a call to a stored function.

  See Also:
    getRole

o POSITIONED

     public static final int POSITIONED

  Constant returned by `getRole` indicating that the operation contains a "WHERE CURRENT OF" clause (positioned update or delete, for example).

  See Also:
    getRole

o QUERY_FOR_UPDATE

     public static final int QUERY_FOR_UPDATE

  Constant returned by `getRole` indicating that the operation produces a result set which will later be used in a positioned update.

  See Also:
    getRole

o SINGLE_ROW_QUERY

     public static final int SINGLE_ROW_QUERY

  Constant returned by `getRole` indicating that the operation produces a result set which is expected to contain a single row.

  See Also:
    getRole

o BLOCK

     public static final int BLOCK

  Constant returned by `getRole` indicating that the operation is a BEGIN..END block.

  See Also:
    getRole

o COMMIT

     public static final int COMMIT

  Constant returned by `getRole` indicating that the operation is a COMMIT statement.

  See Also:
    getRole

o ROLLBACK

     public static final int ROLLBACK

  Constant returned by `getRole` indicating that the operation is a ROLLBACK statement.

  See Also:
    getRole

o SET_TRANSACTION

     public static final int SET_TRANSACTION

  Constant returned by `getRole` indicating that the operation is a SET TRANSACTION statement. For such an entry, the `getDescriptor` method returns a SetTransactionDescriptor that further describes the transaction access mode and isolation level.

  See Also:
    getRole, getDescriptor, SetTransactionDescriptor

o OTHER

     public static final int OTHER

  Constant returned by `getRole` indicating that the operation cannot be categorized by any of the other constant roles returned by `getRole`. The value of this constant also defines the upper limit that future role constants added to the EntryInfo class may obtain. Thus, if additional vendor-specific roles are defined, they should be defined with values larger than that of this constant.

  See Also:
    getRole

o NO_RESULT

     public static final int NO_RESULT

  Constant returned by `getResultSetType` indicating that this entry does not produce a result set. If the result type indicates NO_RESULT, then `getResultSetInfo` will always return null, `getResultSetCount` will always return 0, and `getExecuteType` will always return EXECUTE_UPDATE.

  See Also:
    getResultSetType, getResultSetInfo, getResultSetCount, getExecuteType

o NAMED_RESULT

     public static final int NAMED_RESULT

  Constant returned by `getResultSetType` indicating that this entry produces a result set whose columns will be bound by name to the columns in this operation. If the result type indicates NAMED_RESULT, then `getResultSetInfo` returns a type info object whose `getName` method reflects the name of the column expected, and `getExecuteType` will always return EXECUTE_QUERY.

  See Also:
    getResultSetType, getResultSetInfo, getExecuteType

o POSITIONED_RESULT

     public static final int POSITIONED_RESULT

  Constant returned by `getResultSetType` indicating that this entry produces a result set whose columns will be bound by position to the columns in this operation. If the result type indicates POSITIONED_RESULT, then `getResultSetInfo` for a particular index returns a type info object describing the column type expected at that index in this operation, and `getExecuteType` will always return EXECUTE_QUERY.

  See Also:
    getResultSetType, getResultSetInfo, getExecuteType

## Constructors

o EntryInfo

     public EntryInfo()

## Methods

o getSQLString

     public abstract String getSQLString()

  Returns the text of the operation to be performed in JDBC format. All host variables have been replaced with '?'. Any INTO-lists have been removed. A positional update will include a clause of the form "WHERE CURRENT OF ?". Comments and hints are preserved as they appeared in the original source file. Function and procedure calls are in the JDBC-prescribed format: `{ call proc(?) }`, and `{ ? = call fn(?) }`.

  Returns:
    the text of the operation to be performed, in jdbc format.

o getStatementType

     public abstract int getStatementType()

  Describes the type of statement. The value returned will be one of the following constants.

  - PREPARED_STATEMENT
  - CALLABLE_STATEMENT

o isValidStatementType

     public static boolean isValidStatementType(int statementType)

  Returns true if the passed int parameter represents a valid statement type, false otherwise. Valid statement type values are those which may be returned by the `getStatementType` method.

  See Also:
    getStatementType

o statementTypeToString

     public static String statementTypeToString(int type)

  Returns a string representation of a statement type constant. If the value passed is not a valid statement type, a string representation of the value as an int is returned. This method is most often used in debugging profile entry representations.

  See Also:
    getStatementType, isValidStatementType

o getExecuteType

     public abstract int getExecuteType()

  Describes the way in which the all executable statement objects associated with this entry will be executed at runtime. The value returned will be one of the following constants.

  - EXECUTE_UPDATE
  - EXECUTE_QUERY
  - EXECUTE

o isValidExecuteType

     public static boolean isValidExecuteType(int execType)

  Returns true if the passed int parameter represents a valid execute type, false otherwise. Valid execute type values are those which may be returned by the `getStatementType` method.

  See Also:
    getExecuteType

o executeTypeToString

     public static String executeTypeToString(int executeType)

  Returns a string representation of an execute type constant. If the value passed is not a valid execute type, a string representation of the value as an int is returned. This method is most often used in debugging profile entry representations.

  See Also:
    getStatementType

o getRole

     public abstract int getRole()

  Returns the role of the operation to be executed. The role categorizes the operation, and is used to determine how the operation is to be treated at runtime. The value returned may be one of the following constants.

  - QUERY
  - STATEMENT
  - CALL
  - VALUES
  - POSITIONED
  - QUERY_FOR_UPDATE
  - SINGLE_ROW_QUERY
  - BLOCK
  - COMMIT
  - ROLLBACK
  - SET_TRANSACTION
  - OTHER

  If the role returned is not one of the above constants, it will be a value which is larger than the value of the constant `OTHER`. Such a result indicates a vendor defined role which may not be reliably processed by all vendors.

  Note: regardless of the role, `getParameterInfo` calls may always be used to describe any parameters for the operation.

o isDefinedRole

     public static boolean isDefinedRole(int role)

  Returns true if the passed int parameter represents a defined role, false otherwise. A defined role is a role which has been defined with a constant field in this class. An enumeration of such constants is found in the `getRole` method documentation.

  See Also:
    getRole

o isValidRole

     public static boolean isValidRole(int role)

  Returns true if the passed int parameter represents a valid role, false otherwise. Valid roles values are any roles which are defined, or any values greater than the `OTHER` constant.

  See Also:
    getRole, isDefinedRole, OTHER

o roleToString

     public static String roleToString(int role)

  Returns a string representation of a role constant. If the value passed is not a valid role or is a custom role, a string representation of the value as an int is returned. This method is most often used in debugging profile entry representations.

  See Also:
    getRole, isValidRole

o getResultSetType

     public abstract int getResultSetType()

  Describes the type of result set that is produced by this operation, if any. This method should be used to determine how the results described by `getResultSetInfo()` are to be interpreted. The value returned will be one of the following constants.

  - NO_RESULT
  - NAMED_RESULT
  - POSITIONED_RESULT

  See Also:
    getResultSetInfo

o isValidResultSetType

     public static boolean isValidResultSetType(int resultSetType)

  Returns true if the passed int parameter represents a valid result set type, false otherwise. Valid result set type values are those which may be returned by the `getResultSetType` method.

  See Also:
    getResultSetType

o resultSetTypeToString

     public static String resultSetTypeToString(int type)

  Returns a string representation of a result set type constant. If the value passed is not a valid result set type, a string representation of the value as an int is returned. This method is most often used in debugging profile entry representations.

  See Also:
    getResultSetType, isValidResultSetType

o getResultSetCount

     public abstract int getResultSetCount()

  Returns the number of columns in the result set produced by this entry, which is always non-negative. If the operation does not produce a result set or produces a dynamic result set, 0 is returned. Otherwise, `getResultSetInfo` can be used to determine the type of each result column.

  Returns:
    the number of columns in the result set produced by this entry, if any.
  See Also:
    getResultSetInfo, getResultSetType

o getResultSetInfo

     public abstract TypeInfo getResultSetInfo(int ndx)

  Returns a description of the result set column at index "ndx". This may be useful to jdbc implementations which are able to pre-register query result types. The mode of the types described by this method will always be OUT. To determine whether the results will by bound by name or by position, use `getResultSetType()`.

  Note that if `getResultSetCount` returns 0, this method will always return null.

  Parameters:
    ndx - the index of the result set column to describe, range 1 to getResultSetCount().
  Returns:
    a description of the result set column at index "ndx", or null if "ndx" out of range.
  See Also:
    getName, getResultSetType

o getResultSetName

     public abstract String getResultSetName()

  Returns the name of the Java Class associated with the strongly typed result set populated by this entry. If this entry does not populate a strongly typed result set (e.g. resultSetType=NO_RESULT), null is returned.

  The `getJavaType` method of a profile can be used to load the class represented by the result set name using the current profile loader.

  Returns:
    the name of the Java Class representation of the type.
  See Also:
    getJavaType, getResultSetType

o getParamCount

     public abstract int getParamCount()

  Returns:
    the number of parameters for this entry, 0 or greater.

o getParamInfo

     public abstract TypeInfo getParamInfo(int ndx)

  Parameters:
    ndx - the index of the parameter to describe, range 1 to getParamCount().
  Returns:
    a description of the parameter at index "ndx", or null if "ndx" out of range.

o getDescriptor

     public abstract Object getDescriptor()

  Returns an object which describes any additional information particular to this entry. The object returned will vary according to the role of the sql statement contained in this entry. The following list describes the type of descriptor returned as a function of the role of this entry.

  POSITIONED
    Returns an Integer whose value is the 1-based index of the CURRENT OF cursor parameter in this entry. For example, if the sql string is UPDATE TAB SET COL1=? WHERE CURRENT OF ?, then 2 would be returned. The index can be passed to `getParamInfo` to describe the cursor type.
  SET_TRANSACTION
    Returns a SetTransactionDescriptor that describes the access mode and isolation level of the SET TRANSACTION statement.
  All Other Roles
    Returns null descriptor.

  Returns:
    a descriptor object for this entry.
  See Also:
    getRole, getParamInfo, SetTransactionDescriptor, getTransactionDescriptor

o getTransactionDescriptor

     public SetTransactionDescriptor getTransactionDescriptor()

  If this entry is a SET TRANSACTION statement, a descriptor is returned that contains the access mode and isolation level of the statement. Otherwise, null is returned.

  See Also:
    SET_TRANSACTION, getDescriptor

o isValidDescriptor

     public static boolean isValidDescriptor(Object descriptor,
                                             int role)

  Returns true if the passed descriptor is of valid type (and value) for an entry which has the given role, false otherwise. The expected descriptor types are defined by the getDescriptor method. Note that in the case of user-defined roles, any descriptor value is permitted.

  See Also:
    getDescriptor

o getLineNumber

     public abstract int getLineNumber()

  Returns the starting line number of the operation represented by this entry. The location returned is the line in the original source file, as given by the `getSourceFile` method of the profile data for this entry. Source file lines are numbered starting at 1. If line number information is not available, 0 is returned.

  See Also:
    getSourceFile

o validateObject

     public void validateObject() throws InvalidObjectException

  Performs validation on the internal state of this entry info object. In particular, the statement type, execute type, role, result set type, and descriptor are validated. An exception is thrown if this type contains invalid state.

  To allow for compatibility with future versions, this method is not automatically called during object deserialization. Profile runtime library implementors should call this method as needed at runtime to verify the state of the object. For example, this method could be called from a readObject implementation of an EntryInfo subclass.

  It is recommended that subclasses use this method during object construction once state is complete to validate the entry.

  See Also:
    isValidStatementType, isValidExecuteType, isValidRole, isValidResultSetType, isValidDescriptor

Class sqlj.runtime.profile.Profile

# Class sqlj.runtime.profile.Profile

    java.lang.Object
       |
       +----sqlj.runtime.profile.Profile

public abstract class Profile
extends Object
implements Serializable

A Profile object is a resource which contains the "constant" information describing a set of sql operations. It also provides a mechanism to add a jdbc connection to a profile, and in so doing, create a "ConnectedProfile" which can be used to create executable statement objects corresponding to the sql operations contained within the profile.

A profile may have a number of associated connected-profiles, each of which represents a customization for a particular data source connection. Profile customization will typically involve vendor-specific profile transformations that allow more efficient sql execution such a precompilation of sql text or use of stored procedures. A profile resolves a connected-profile from a data source connection via the use of a profile Customization object. A profile maintains a set of customization objects in much the same way that the JDBC DriverManager manages a set of JDBC drivers. A profile which has no customizations will default to a JDBC-based dynamic SQL connected profile implementation.

## Constructor Index

o Profile(Loader)
  Creates a new profile associated with the given loader.

## Method Index

o deregisterCustomization(Customization)
  Drop a customization from the profile's list.
o getConnectedProfile(Connection)
  Resolves the contents of this profile with the passed JDBC connection and returns the result.
o getContextName()
  Returns the fully qualified name of the connection context for this profile.
o getCustomizations()
o getJavaType(String)
  Returns a Java Class representation of the passed type name loaded using this profile's loader.
o getJavaType(TypeInfo)
  Returns a Java Class representation of the passed type info object loaded using this profile's loader.
o getLoader()
o getProfileData()
o getProfileName()
o getTimestamp()
  Returns the creation time of the profile, as given by System.currentTimeMillis.
o instantiate(Loader, InputStream)
  Instantiates a profile object from a serialized format stored in the passed input stream using the passed profile loader.
o instantiate(Loader, String)
  Instantiates a profile object corresponding to a profile name using the passed profile loader.
o registerCustomization(Customization)
  Registers a customization for this profile instance.
o registerCustomization(Customization, Customization)
  Registers a customization for this profile instance.
o replaceCustomization(Customization, Customization)
  Registers a customization for this profile instance.

## Constructors

o Profile

     public Profile(Loader loader)

  Creates a new profile associated with the given loader. If the passed loader is null, then a DefaultLoader which uses the system class loader is used.

  A profile is an abstract object that only directly implements and manages those methods involving a loader. All other methods are implemented by subclasses.

  Note that this method is only used when creating new profile objects. To instantiate an existing profile object, use the `instantiate` method.

  Parameters:
    loader - the loader to associate with this instance of the profile
  See Also:
    instantiate, DefaultLoader

## Methods

o getProfileName

     public abstract String getProfileName()

  Returns:
    the fully qualified name of the profile.

o getContextName

     public abstract String getContextName()

  Returns the fully qualified name of the connection context for this profile. Each profile is associated with a particular connection context class.

o getTimestamp

     public abstract long getTimestamp()

  Returns the creation time of the profile, as given by System.currentTimeMillis. A profile for a particular application and context may evolve over time. The timestamp is intended to properly identify which profile should be used.

  Returns:
    the timestamp of the profile.

o getProfileData

     public abstract ProfileData getProfileData()

  Returns:
    a data object describing each of the sql operations contained in this profile.

o getConnectedProfile

     public abstract ConnectedProfile getConnectedProfile(Connection conn) throws SQLException

  Resolves the contents of this profile with the passed JDBC connection and returns the result. The implementation of this method will return the connected-profile associated with the first registered customization that accepts the passed connection. If no customization is found that accepts the connection, a default connected-profile implementation based on JDBC dynamic SQL will be returned.

  An exception is raised if a customization that accepts the connection is found, but is unable to create a connected profile. For example, a profile contains entries which cannot be executed on the particular connection.

  Parameters:
    conn - a JDBC Connection over which to perform operations.
  Returns:
    the result of attaching this profile to the given connection.
  Throws: SQLException
    if a connected-profile cannot be created for the supplied connection.
  See Also:
    Customization

o registerCustomization

     public abstract void registerCustomization(Customization customization)

  Registers a customization for this profile instance. The customization is added after all currently registered customizations.

  Generally, a runtime environment will not call this method directly. Rather, this method may be called by customization utilities which operate on application profiles during an "installation" phase.

  Throws: NullPointerException
    if the customization argument is null

o registerCustomization

     public abstract void registerCustomization(Customization newCustomization,
                                                Customization nextCustomization)

  Registers a customization for this profile instance. The new customization is added to the list just prior to the next customization argument. If the next customization is not currently registered, an exception is raised.

  Generally, a runtime environment will not call this method directly. Rather, this method may be called by customization utilities which operate on application profiles during an "installation" phase.

  Parameters:
    newCustomization - the customization to register
    nextCustomization - the customization before which to add the new customization
  Throws: NullPointerException
    if the new customization argument is null
  Throws: IllegalArgumentException
    if the next customization argument is not currently registered

o replaceCustomization

     public abstract void replaceCustomization(Customization newCustomization,
                                               Customization oldCustomization)

  Registers a customization for this profile instance. The new customization is added to the list in place of the old customization argument. The new customization retains the position of the old customization. If the old customization is not currently registered, an exception is raised.

  Generally, a runtime environment will not call this method directly. Rather, this method may be called by customization utilities which operate on application profiles during an "installation" phase.

  Parameters:
    newCustomization - the customization to register
    oldCustomization - the customization to replace
  Throws: NullPointerException
    if the new customization argument is null
  Throws: IllegalArgumentException
    if the old customization argument is not currently registered

o deregisterCustomization

     public abstract void deregisterCustomization(Customization customization)

  Drop a customization from the profile's list.

  Throws: IllegalArgumentException
    if the customization argument is not currently registered

o getCustomizations

     public abstract Enumeration getCustomizations()

  Returns:
    an enumeration of all customizations currently registered with the profile.

o getLoader

     public Loader getLoader()

  Returns:
    the profile-loader used to instantiate this profile

o getJavaType

     public Class getJavaType(TypeInfo type)

  Returns a Java Class representation of the passed type info object loaded using this profile's loader. Each type appears in the original source file as a Java expression (variable) or cursor column whose type can be determined at compile time. The returned class may be used to determine an appropriate JDBC mapping into a SQL type.

  This profile's loader instance is used to load new class instances (for non-primitive types). The class is loaded based on the name of the java type given by the type info object. If the class cannot be loaded, a NoClassDefFoundError is raised. This would only be the case if the classes with which the profile was created are not available to the profile's loader.

  Parameters:
    type - the type info object describing the Java class to load
  Returns:
    a Java Class representation of the type
  See Also:
    getJavaTypeName, loadClass

o getJavaType

     public Class getJavaType(String className)

  Returns a Java Class representation of the passed type name loaded using this profile's loader. This profile's loader instance is used to load new class instances (for non-primitive types). If the class cannot be loaded, a NoClassDefFoundError is raised.

  String names starting with "[" are interpreted as array names. Note that unlike Java VM array naming, array names passed to this method are expected to have the form "[" + . Accordingly, an array of array of int is named "[[int".

  Parameters:
    className - the name of the Java class to load
  Returns:
    a Java Class representation of the type
  See Also:
    getJavaTypeName, getResultSetName, loadClass

o instantiate

     public static Profile instantiate(Loader loader,
                                       String profileName) throws IOException, ClassNotFoundException

  Instantiates a profile object corresponding to a profile name using the passed profile loader. If the passed loader is null, a DefaultLoader which uses the system class loader is used.

  In general, Profiles are not instantiated directly by the programmer. Rather, they are employed by the runtime implementation and generated code. It is the responsibility of the runtime and generated code to ensure that the profile-loader used to find a profile is able to unambiguoulsy resolve the profile name associated with a particular application. For example, if a particular application is loaded from a JAR file, the profiles associated with that application will be loaded from the same JAR file.

  The profile is created based on a name relative to a profile loader. This name should be a dot-separated name such as "a.b.c".

  The given name can indicate either a serialized object or a class. The profileName is first treated as a serialized object name and then as a class name.

  When using the profileName as a serialized object name we convert the given profileName to a resource pathname and add a trailing ".ser" suffix. We then try to load a serialized object from that resource.

  When using the profileName as a class name, the type of the class loaded is considered. If the class represents a sqlj.runtime.profile.Profile class or subclass, the class is instantiated and the result returned. If the class loaded implements the sqlj.runtime.profile.SerializedProfile interface, then the class is instantiated as a SerializedProfile and the getProfileAsStream method is called to read and instantiate a profile from the resulting stream. If the class loaded does not adhere to one of these cases, an error is raised.

  For example, given a profileName of "x.y", this method would first try to read a serialized object from the resource "x/y.ser" and if that failed it would try to load the class "x.y" and create an instance of that class. Note that if both a serialized object and a class share the same profile name, only the serialized object will be instantiated and returned.

  A new profile instance is created each time the instantiate method is called. Thus, passing the same profile loader and profile name as a previously instantiated profile instance will not return the same object as the previous call but rather will instantiate a new object.

  Parameters:
    loader - the profile-loader from which we should create the profile.
    profileName - the name of the profile within the profile-loader. For example "sqlj.app.profile1"
  Throws: ClassNotFoundException
    if the class or a serialized object could not be found.
  Throws: IOException
    if an I/O error occurs.
  See Also:
    SerializedProfile, DefaultLoader

o instantiate

     public static Profile instantiate(Loader loader,
                                       InputStream serProfile) throws ClassNotFoundException, IOException

  Instantiates a profile object from a serialized format stored in the passed input stream using the passed profile loader. If the passed loader is null, a DefaultLoader which uses the system class loader is used.

  This routine is generally used at installation time to create a profile instance from serialized form in a resource file. The profile will often be customized, and then reserialied to the same resource file. The installation process relies on knowing the resource file with which a particular profile is associated.

  Note: The passed input stream is closed by this method, even when an exception is raised.

  Parameters:
    loader - the profile-loader from which we should create the profile.
    serProfile - an input stream containing a profile in serialized format.
  Throws: ClassNotFoundException
    if a serialized profile could not be found.
  Throws: IOException
    if an I/O error occurs.
  See Also:
    DefaultLoader

Class sqlj.runtime.profile.ProfileData

# Class sqlj.runtime.profile.ProfileData

    java.lang.Object
       |
       +----sqlj.runtime.profile.ProfileData

public abstract class ProfileData
extends Object
implements Serializable

The profile data class manages a collection of profile entries, where each entry describes a static sql operation. A profile data object represents the sql resources of a particular connection context defined within an application module.

## Constructor Index

o ProfileData()

## Method Index

o getEntryInfo(int)
o getProfile()
o getSourceFile()
  Returns the name of the source file from which this profile was generated, or null if not available.
o size()

## Constructors

o ProfileData

     public ProfileData()

## Methods

o size

     public abstract int size()

  Returns:
    the number of entries in the profile

o getEntryInfo

     public abstract EntryInfo getEntryInfo(int ndx)

  Parameters:
    ndx - the index of the entry to describe, range 0 to size()-1.
  Returns:
    a description of the entry at index "ndx" in the profile.

o getProfile

     public abstract Profile getProfile()

  Returns:
    the profile with which this object is associated

o getSourceFile

     public abstract String getSourceFile()

  Returns the name of the source file from which this profile was generated, or null if not available. The name returned includes the file extension, but no path information (e.g. "MyFile.sqlj").

Class sqlj.runtime.profile.SetTransactionDescriptor

# Class sqlj.runtime.profile.SetTransactionDescriptor

    java.lang.Object
       |
       +----sqlj.runtime.profile.SetTransactionDescriptor

public class SetTransactionDescriptor
extends Object
implements Serializable

A SetTransactionDescriptor describes the access mode and isolation level of a SET TRANSACTION statement.

See Also:
  getDescriptor

## Variable Index

o READ_NONE
  Constant returned by `getAccessMode` indicating that an access mode was not specified for the transaction.
o READ_ONLY
  Constant returned by `getAccessMode` indicating transaction read-only access mode.
o READ_WRITE
  Constant returned by `getAccessMode` indicating transaction read-write access mode.

## Constructor Index

o SetTransactionDescriptor(int, int)
  Creates a new set transaction descriptor with the given access mode and isolation level.

## Method Index

o getAccessMode()
  The specified access mode for the transaction.
o getIsolationLevel()
  The specified isolation level for the transaction.
o toString()
  Returns a string describing the access mode and isolation level of this object, in the format "ACCESS_MODE=mode,ISOLATION_LEVEL=level".

## Variables

o READ_ONLY

     public static final int READ_ONLY

  Constant returned by `getAccessMode` indicating transaction read-only access mode.

  See Also:
    getAccessMode

o READ_WRITE

     public static final int READ_WRITE

  Constant returned by `getAccessMode` indicating transaction read-write access mode.

  See Also:
    getAccessMode

o READ_NONE

     public static final int READ_NONE

  Constant returned by `getAccessMode` indicating that an access mode was not specified for the transaction.

  See Also:
    getAccessMode

## Constructors

o SetTransactionDescriptor

     public SetTransactionDescriptor(int accessMode,
                                     int isolationLevel)

  Creates a new set transaction descriptor with the given access mode and isolation level. If access mode is undefined, use READ_NONE. If isolation level is undefined, use TRANSACTION_NONE.

  Parameters:
    accessMode - the access mode for this descriptor
    isolationLevel - the isolation level for this descriptor

## Methods

o getAccessMode

     public int getAccessMode()

  The specified access mode for the transaction. The value returned will be one of the following constants.

  - READ_ONLY
  - READ_WRITE
  - READ_NONE

  A return value of READ_NONE indicates that an access mode was not explicitly specified for this transaction.

o getIsolationLevel

     public int getIsolationLevel()

  The specified isolation level for the transaction. The value returned will be one of the following java.sql.Connection-defined constants.

  - TRANSACTION_READ_COMMITTED
  - TRANSACTION_READ_UNCOMMITTED
  - TRANSACTION_REPEATABLE_READ
  - TRANSACTION_SERIALIZABLE
  - TRANSACTION_NONE

  A return value of TRANSACTION_NONE indicates that an isolation level was not explicitly specified for this transaction.

o toString

     public String toString()

  Returns a string describing the access mode and isolation level of this object, in the format "ACCESS_MODE=mode,ISOLATION_LEVEL=level".

  Overrides:
    toString in class Object

Class sqlj.runtime.profile.TypeInfo

# Class sqlj.runtime.profile.TypeInfo

    java.lang.Object
       |
       +----sqlj.runtime.profile.TypeInfo

public abstract class TypeInfo
extends Object
implements Serializable, ObjectInputValidation

A TypeInfo object describes the type of a parameter passed to a sql operation or column of a ResultSet produced by a sql operation. The type consists of the java type of the actual Java expression which appears in the original source file, its corrsponding jdbc sql type, the name of the variable or column producing the type (if available), and its modality.

See Also:
  getJavaType

## Variable Index

o IN
  IN parameter mode, same value as DatabaseMetaData.procedureColumnIn.
o INOUT
  INOUT parameter mode, same value as DatabaseMetaData.procedureColumnInOut.
o OUT
  OUT parameter mode, same value as DatabaseMetaData.procedureColumnOut.

## Constructor Index

o TypeInfo()

## Method Index

o getJavaTypeName()
  Returns the name of the Java Class representation of the type.
o getMarkerIndex()
  Returns the 0-based index of the '?' marker for this parameter in the sql string.
o getMode()
  Returns the modality of this parameter.
o getName()
  Returns the name of the variable or column producing this type.
o getSQLType()
  Returns the default mapping of this type as a SQL type, as defined in java.sql.Types.
o isValidMode(int)
  Returns true if the passed int parameter represents a valid mode type, false otherwise.
o isValidSQLType(int)
  Returns true if the passed int parameter represents a valid sql type, false otherwise.
o modeToString(int)
  Returns a string representation of a mode constant.
o SQLTypeToString(int)
  Returns a string representation of a sql type constant.
o validateObject()
  Performs validation on the internal state of this type info object.

## Variables

o IN

     public static final int IN

  IN parameter mode, same value as DatabaseMetaData.procedureColumnIn.

  See Also:
    procedureColumnIn

o OUT

     public static final int OUT

  OUT parameter mode, same value as DatabaseMetaData.procedureColumnOut.

  See Also:
    procedureColumnOut

o INOUT

     public static final int INOUT

  INOUT parameter mode, same value as DatabaseMetaData.procedureColumnInOut.

  See Also:
    procedureColumnInOut

## Constructors

o TypeInfo

     public TypeInfo()

## Methods

o getJavaTypeName

     public abstract String getJavaTypeName()

  Returns the name of the Java Class representation of the type. Each type appears in the original source file as a Java expression (variable) or cursor column whose type can be determined at compile time. This name may be used to determine an appropriate JDBC mapping into a SQL type.

  Some customizations may find it most conveniant to work with type names, while others will need to query the reflection of complete classes. The `getJavaType` of a profile can be used to create a class reflection from a type info object. One benefit of using this method over `getJavaType` is that this method is guaranteed to succeed, while `getJavaType` may result in a `NoClassDefFoundError` if the classes in question have not been distributed with the profile.

  In most cases, the name returned is the same as the result of calling `profile.getJavaTye(type).getName()`; primitive types have their simple names (e.g. `int`), classes are fully qualified (e.g. `java.sql.Date`), and nested classes are delimited with '$' (e.g. `x.y.OuterClass$InnerClass`). However, array naming does not follow the conventions of Class.getName(). If the name returned represents an array, the string "[" is prepended to the full name of the component type. For example, an array of array of String would have the name `[[java.lang.String`.

  Returns:
    the name of the Java Class representation of the type.
  See Also:
    getJavaType

o getSQLType

     public abstract int getSQLType()

  Returns the default mapping of this type as a SQL type, as defined in java.sql.Types. The Java Class represented by this type is mapped into a SQL type as defined by the JDBC default mappings. In the case that the JDBC specification defines a mapping from Java type into SQL type, that mapping is used. For example, if the Java class is Double, Types.DOUBLE is returned. If no JDBC recommended conversion exists for the class specified, Types.OTHER is returned. Profile customizations can be used to properly handle classes which would otherwise not be recognized by default JDBC mappings. They may also be used to override the default mappings.

  Default conversions are described in the JDBC specification, sections 8.6.2 and 8.6.4

  Returns:
    the default mapping of this type as a SQL type.
  See Also:
    Types

o isValidSQLType

     public static boolean isValidSQLType(int sqlType)

  Returns true if the passed int parameter represents a valid sql type, false otherwise. Valid sql type values are those constants which are defined in the class java.sql.Types. Note that vendors may define their own sql types in addition to those found in java.sql.Types. In such cases, this method will return false.

  See Also:
    getSQLType, Types

o SQLTypeToString

     public static String SQLTypeToString(int sqlType)

  Returns a string representation of a sql type constant. If the passed sql type is not valid, a string representation of its value as an int is returned. This method is most often used in debugging profile entry representations.

  See Also:
    getSQLType, isValidSQLType

o getName

     public abstract String getName()

  Returns the name of the variable or column producing this type.

  If this object is used to describe a parameter to a sql operation (a la EntryInfo.getParamInfo), then getName will return the name of the variable associated with this parameter in the original source file. If the name of the variable cannot be determined or cannot be expressed in terms of a simple name, null is returned. If the parameter is a complex expression, null will be returned.

  If this object is used to describe a column of a result set produced by a sql operation (a la EntryInfo.getResultSetInfo), then getName will return the name of the column in the result set to which this type is bound. If the column name could not be determined, null is returned. Note that this name is required to match the name of a column in the result of a sql operation if and only if the entry info indicates that results are bound by name.

  Returns:
    the name of the variable or column producing this type.
  See Also:
    getParamInfo, getResultSetInfo, getResultSetType

o getMode

     public abstract int getMode()

  Returns the modality of this parameter. The value returned will be one of the constants IN, OUT, or INOUT.

o isValidMode

     public static boolean isValidMode(int mode)

  Returns true if the passed int parameter represents a valid mode type, false otherwise. Valid sql mode values are those constants which may be returned byt he `getMode` method.

  See Also:
    getMode

o modeToString

     public static String modeToString(int mode)

  Returns a string representation of a mode constant. If the value passed does not represent a valid mode, a string representation of the value as an int is returned. This method is most often used in debugging profile entry representations.

  See Also:
    getMode, isValidMode

o getMarkerIndex

     public abstract int getMarkerIndex()

  Returns the 0-based index of the '?' marker for this parameter in the sql string. Returns -1 if this object does not represent a parameter.

  See Also:
    getSQLString

o validateObject

     public void validateObject() throws InvalidObjectException

  Performs validation on the internal state of this type info object. In particular, the mode is checked via the isValidMode routine. An exception is thrown if this type contains invalid state.

  To allow for compatibility with future versions, this method is not automatically called during object deserialization. Profile runtime library implementors should call this method as needed at runtime to verify the state of the object. For example, this method could be called from a readObject implementation of a TypeInfo subclass.

  It is recommended that subclasses use this method during object construction once state is complete to validate the type.

  See Also:
    isValidMode