public class BasicSQLRuntime extends java.lang.Object implements SQLRuntime
SQLRuntime
interface.StatementWrapper
,
PreparedStatementWrapper
,
ResultSetWrapper
Constructor and Description |
---|
BasicSQLRuntime()
Creates a new
BasicSQLRuntime instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
closeStatement(java.sql.Statement stmt)
Closes a JDBC
Statement object. |
protected java.sql.Statement |
createStatement()
Creates a new JDBC
Statement instance. |
java.sql.ResultSet |
executeQuery(java.lang.String sql)
Executes a SQL query.
|
void |
executeUpdate(java.lang.String sql)
Executes a SQL statement.
|
java.sql.Connection |
getConnection() |
JDBCContext |
getContext() |
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
Creates a
CallableStatement object for calling database stored
procedures. |
java.sql.PreparedStatement |
prepareQuery(java.lang.String sql) |
java.sql.PreparedStatement |
prepareUpdate(java.lang.String sql) |
void |
setConnection(java.sql.Connection conn)
Sets the JDBC database connection.
|
void |
setContext(JDBCContext s)
Sets the JDBC context.
|
public BasicSQLRuntime()
BasicSQLRuntime
instance.public void setConnection(java.sql.Connection conn)
SQLRuntime
setConnection
in interface SQLRuntime
conn
- connectionpublic java.sql.Connection getConnection()
getConnection
in interface SQLRuntime
public void setContext(JDBCContext s)
SQLRuntime
setContext
in interface SQLRuntime
s
- JDBCContextpublic JDBCContext getContext()
getContext
in interface SQLRuntime
public void executeUpdate(java.lang.String sql) throws java.sql.SQLException
SQLRuntime
executeUpdate
in interface SQLRuntime
sql
- SQLjava.sql.SQLException
- SQLExceptionpublic java.sql.PreparedStatement prepareUpdate(java.lang.String sql) throws java.sql.SQLException
prepareUpdate
in interface SQLRuntime
sql
- SQLjava.sql.SQLException
- SQLExceptionpublic java.sql.PreparedStatement prepareQuery(java.lang.String sql) throws java.sql.SQLException
prepareQuery
in interface SQLRuntime
sql
- SQLjava.sql.SQLException
- SQLExceptionpublic java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
SQLRuntime
executeQuery
in interface SQLRuntime
sql
- SQLjava.sql.SQLException
- SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
SQLRuntime
CallableStatement
object for calling database stored
procedures.prepareCall
in interface SQLRuntime
sql
- SQLjava.sql.SQLException
- SQLExceptionprotected java.sql.Statement createStatement() throws java.sql.SQLException
Statement
instance.Statement
objectjava.sql.SQLException
- SQLExceptionprotected void closeStatement(java.sql.Statement stmt)
Statement
object.stmt
- a Statement
objectCopyright © 2000-2020 TIBCO Software Inc. All Rights Reserved.