com.continuent.tungsten.replicator.applier.batch
Class SqlWrapper

java.lang.Object
  extended by com.continuent.tungsten.replicator.applier.batch.SqlWrapper

public class SqlWrapper
extends java.lang.Object

Provides a simple wrapper for JDBC connections that is suitable for exposure in scripted environments. This class may be extended to allow additional methods for specific DBMS types.


Field Summary
protected  Database connection
           
protected  java.sql.Statement statement
           
 
Constructor Summary
SqlWrapper(Database connection)
          Creates a new instance.
 
Method Summary
 void close()
          Releases the statement.
 int execute(java.lang.String sql)
          Executes a SQL statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

protected final Database connection

statement

protected java.sql.Statement statement
Constructor Detail

SqlWrapper

public SqlWrapper(Database connection)
           throws java.sql.SQLException
Creates a new instance.

Throws:
java.sql.SQLException
Method Detail

execute

public int execute(java.lang.String sql)
            throws java.sql.SQLException
Executes a SQL statement.

Throws:
java.sql.SQLException

close

public void close()
Releases the statement.