com.ibatis.common.jdbc
Class ScriptRunner

java.lang.Object
  extended bycom.ibatis.common.jdbc.ScriptRunner

Deprecated. There are better tools available for running scripts. This class has become out of scope for iBATIS.

public class ScriptRunner
extends java.lang.Object

Tool to run database scripts


Constructor Summary
ScriptRunner()
          Deprecated. Default constructor
ScriptRunner(java.util.Map props)
          Deprecated. Constructor to allow passing in a Map with configuration data
 
Method Summary
 java.lang.String getDriver()
          Deprecated. Getter for driver property
 java.io.PrintWriter getErrorLogWriter()
          Deprecated. Getter for errorLogWriter property
 java.io.PrintWriter getLogWriter()
          Deprecated. Getter for logWriter property
 java.lang.String getPassword()
          Deprecated. Getter for password property
 java.lang.String getUrl()
          Deprecated. Getter for url property
 java.lang.String getUsername()
          Deprecated. Getter for username property
 boolean isAutoCommit()
          Deprecated. Getter for autoCommit property
 boolean isStopOnError()
          Deprecated. Getter for stopOnError property
 void runScript(java.sql.Connection conn, java.io.Reader reader)
          Deprecated. Runs an SQL script (read in using the Reader parameter) using the connection passed in
 void runScript(java.io.Reader reader)
          Deprecated. Runs an SQL script (read in using the Reader parameter)
 void setAutoCommit(boolean autoCommit)
          Deprecated. Setter for autoCommit property
 void setDriver(java.lang.String driver)
          Deprecated. Setter for driver property
 void setErrorLogWriter(java.io.PrintWriter errorLogWriter)
          Deprecated. Setter for errorLogWriter property
 void setLogWriter(java.io.PrintWriter logWriter)
          Deprecated. Setter for logWriter property
 void setPassword(java.lang.String password)
          Deprecated. Setter for password property
 void setStopOnError(boolean stopOnError)
          Deprecated. Setter for stopOnError property
 void setUrl(java.lang.String url)
          Deprecated. Setter for url property
 void setUsername(java.lang.String username)
          Deprecated. Setter for username property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptRunner

public ScriptRunner()
Deprecated. 
Default constructor


ScriptRunner

public ScriptRunner(java.util.Map props)
Deprecated. 
Constructor to allow passing in a Map with configuration data

Parameters:
props - - the configuration properties
Method Detail

isStopOnError

public boolean isStopOnError()
Deprecated. 
Getter for stopOnError property

Returns:
The value of the stopOnError property

setStopOnError

public void setStopOnError(boolean stopOnError)
Deprecated. 
Setter for stopOnError property

Parameters:
stopOnError - - the new value of the stopOnError property

isAutoCommit

public boolean isAutoCommit()
Deprecated. 
Getter for autoCommit property

Returns:
The value of the autoCommit property

setAutoCommit

public void setAutoCommit(boolean autoCommit)
Deprecated. 
Setter for autoCommit property

Parameters:
autoCommit - - the new value of the autoCommit property

getLogWriter

public java.io.PrintWriter getLogWriter()
Deprecated. 
Getter for logWriter property

Returns:
The value of the logWriter property

setLogWriter

public void setLogWriter(java.io.PrintWriter logWriter)
Deprecated. 
Setter for logWriter property

Parameters:
logWriter - - the new value of the logWriter property

getErrorLogWriter

public java.io.PrintWriter getErrorLogWriter()
Deprecated. 
Getter for errorLogWriter property

Returns:
The value of the errorLogWriter property

setErrorLogWriter

public void setErrorLogWriter(java.io.PrintWriter errorLogWriter)
Deprecated. 
Setter for errorLogWriter property

Parameters:
errorLogWriter - - the new value of the errorLogWriter property

getDriver

public java.lang.String getDriver()
Deprecated. 
Getter for driver property

Returns:
The value of the driver property

setDriver

public void setDriver(java.lang.String driver)
Deprecated. 
Setter for driver property

Parameters:
driver - - the new value of the driver property

getUrl

public java.lang.String getUrl()
Deprecated. 
Getter for url property

Returns:
The value of the url property

setUrl

public void setUrl(java.lang.String url)
Deprecated. 
Setter for url property

Parameters:
url - - the new value of the url property

getUsername

public java.lang.String getUsername()
Deprecated. 
Getter for username property

Returns:
The value of the username property

setUsername

public void setUsername(java.lang.String username)
Deprecated. 
Setter for username property

Parameters:
username - - the new value of the username property

getPassword

public java.lang.String getPassword()
Deprecated. 
Getter for password property

Returns:
The value of the password property

setPassword

public void setPassword(java.lang.String password)
Deprecated. 
Setter for password property

Parameters:
password - - the new value of the password property

runScript

public void runScript(java.io.Reader reader)
               throws java.lang.ClassNotFoundException,
                      java.sql.SQLException,
                      java.io.IOException,
                      java.lang.IllegalAccessException,
                      java.lang.InstantiationException
Deprecated. 
Runs an SQL script (read in using the Reader parameter)

Parameters:
reader - - the source of the script
Throws:
java.lang.ClassNotFoundException - if the driver class cannot be found
java.sql.SQLException - if any SQL errors occur
java.io.IOException - if there is an error reading from the Reader
java.lang.IllegalAccessException - if there are problems creating the driver class
java.lang.InstantiationException - if there are problems creating the driver class

runScript

public void runScript(java.sql.Connection conn,
                      java.io.Reader reader)
               throws java.io.IOException,
                      java.sql.SQLException
Deprecated. 
Runs an SQL script (read in using the Reader parameter) using the connection passed in

Parameters:
conn - - the connection to use for the script
reader - - the source of the script
Throws:
java.sql.SQLException - if any SQL errors occur
java.io.IOException - if there is an error reading from the Reader