com.spotfire.ws.im.ds.sql
Class BasicSQLRuntime

java.lang.Object
  extended by com.spotfire.ws.im.ds.sql.BasicSQLRuntime
All Implemented Interfaces:
SQLRuntime

public class BasicSQLRuntime
extends Object
implements SQLRuntime

A basic implementation of the SQLRuntime interface.

Since:
7.2
See Also:
StatementWrapper, PreparedStatementWrapper, ResultSetWrapper

Constructor Summary
BasicSQLRuntime()
          Creates a new BasicSQLRuntime instance.
 
Method Summary
protected  void closeStatement(Statement stmt)
          Closes a JDBC Statement object.
protected  Statement createStatement()
          Creates a new JDBC Statement instance.
 ResultSet executeQuery(String sql)
          Executes a SQL query.
 void executeUpdate(String sql)
          Executes a SQL statement.
 Connection getConnection()
          Returns the JDBC database connection.
 JDBCContext getContext()
          Returns the JDBC context.
 CallableStatement prepareCall(String sql)
          Creates a CallableStatement object for calling database stored procedures.
 PreparedStatement prepareQuery(String sql)
          Creates a precompiled SQL statement for a parameterized query.
 PreparedStatement prepareUpdate(String sql)
          Creates a precompiled SQL statement.
 void setConnection(Connection conn)
          Sets the JDBC database connection.
 void setContext(JDBCContext s)
          Sets the JDBC context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicSQLRuntime

public BasicSQLRuntime()
Creates a new BasicSQLRuntime instance.

Method Detail

setConnection

public void setConnection(Connection conn)
Description copied from interface: SQLRuntime
Sets the JDBC database connection.

Specified by:
setConnection in interface SQLRuntime

getConnection

public Connection getConnection()
Description copied from interface: SQLRuntime
Returns the JDBC database connection.

Specified by:
getConnection in interface SQLRuntime

setContext

public void setContext(JDBCContext s)
Description copied from interface: SQLRuntime
Sets the JDBC context.

Specified by:
setContext in interface SQLRuntime

getContext

public JDBCContext getContext()
Description copied from interface: SQLRuntime
Returns the JDBC context.

Specified by:
getContext in interface SQLRuntime

executeUpdate

public void executeUpdate(String sql)
Description copied from interface: SQLRuntime
Executes a SQL statement.

Specified by:
executeUpdate in interface SQLRuntime

prepareUpdate

public PreparedStatement prepareUpdate(String sql)
Description copied from interface: SQLRuntime
Creates a precompiled SQL statement.

Specified by:
prepareUpdate in interface SQLRuntime

prepareQuery

public PreparedStatement prepareQuery(String sql)
Description copied from interface: SQLRuntime
Creates a precompiled SQL statement for a parameterized query.

Specified by:
prepareQuery in interface SQLRuntime

executeQuery

public ResultSet executeQuery(String sql)
Description copied from interface: SQLRuntime
Executes a SQL query.

Specified by:
executeQuery in interface SQLRuntime

prepareCall

public CallableStatement prepareCall(String sql)
Description copied from interface: SQLRuntime
Creates a CallableStatement object for calling database stored procedures.

Specified by:
prepareCall in interface SQLRuntime

createStatement

protected Statement createStatement()
Creates a new JDBC Statement instance.

Returns:
a new Statement object

closeStatement

protected void closeStatement(Statement stmt)
Closes a JDBC Statement object.

Parameters:
stmt - a Statement object


Copyright © 2000-2009 TIBCO Software Inc. All Rights Reserved.