All Packages This Package Previous Next
Class sqlj.runtime.profile.ref.JDBCProfile
java.lang.Object
|
+----sqlj.runtime.profile.ref.JDBCProfile
- public class JDBCProfile
- extends Object
- implements DynamicProfile
A JDBCProfile is a dynamic connected profile that implements the
getStatement, prepareStatement and prepareCall methods using the
standard jdbc dynamic sql mapping. This profile employs lazy
verification and creation of statement objects (no statements are
created until requested).
-
JDBCProfile(Connection, ProfileData)
- Creates a new object which operates on the passed profile data using the
passed connection.
-
close()
- Closes the jdbc connected profile instance resources.
-
getConnection()
-
-
getProfileData()
-
-
getStatement(int)
- Creates a statement implemented using JDBC.
-
prepareCall(String)
- Creates and returns an instance of class RTStatementJDBCCallable.
-
prepareStatement(String)
- Creates and returns an instance of class RTStatementJDBCPrepared.
JDBCProfile
public JDBCProfile(Connection conn,
ProfileData profileData)
- Creates a new object which operates on the passed profile data using the
passed connection.
- Parameters:
- conn - the JDBC connection from which to create statements
- profileData - the profile data with which to operate
- See Also:
- getConnectedProfile
getProfileData
public ProfileData getProfileData()
- Returns:
- s the profile data with which this object was created
getConnection
public Connection getConnection()
- Returns:
- s the JDBC connection with which this object was created
getStatement
public RTStatement getStatement(int ndx) throws SQLException
- Creates a statement implemented using JDBC. If the statementType is
CALLABLE, prepareCall is used to create the statement. Otherwise,
prepareStatement is used. Any out-parameters of the statement are
registered on the underlying JDBC statement before the statement is
returned. The SQL string stored in the profile data entry for the
passed index is used to create the statement.
- Throws: SQLException
- if an error occurs while preparing statement
- See Also:
- getSQLString, getStatementType, prepareStatement, prepareCall
prepareCall
public RTStatement prepareCall(String sql) throws SQLException
- Creates and returns an instance of class RTStatementJDBCCallable. The
underlying callable statement is created based on the passed operation
text with a call to the standard JDBC defined
Connection.prepareCall()
method.
The caller must register out-parameters of the statement returned.
- Parameters:
- the - text of the sql operation to prepare
- Throws: SQLException
- if an error occurs while preparing call
- See Also:
- getSQLString, RTStatementJDBCCallable
prepareStatement
public RTStatement prepareStatement(String sql) throws SQLException
- Creates and returns an instance of class RTStatementJDBCPrepared. The
underlying callable statement is created based on the passed operation
text with a call to the standard JDBC defined
Connection.prepareStatement()
method.
- Parameters:
- the - text of the sql operation to prepare
- Throws: SQLException
- if an error occurs while preparing statement
- See Also:
- getSQLString, RTStatementJDBCPrepared
close
public void close() throws SQLException
- Closes the jdbc connected profile instance resources.
- Throws: SQLException
- if an error occurs while closing
All Packages This Package Previous Next