All Packages    This Package  Previous  Next  

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:

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.

All Packages    This Package  Previous  Next