org.cafesip.upgrade.runners
Class SqlScriptRunner

java.lang.Object
  extended by org.cafesip.upgrade.runners.SqlScriptRunner
All Implemented Interfaces:
ScriptRunner

public class SqlScriptRunner
extends java.lang.Object
implements ScriptRunner

The class executes SQL script. An instance of this class handles files with .sql extension. It is tested only with MySQL at this point.

Author:
Amit Chatterjee

Constructor Summary
SqlScriptRunner()
          A constructor for this class.
 
Method Summary
 void execute(java.io.File file)
          The upgrader tool calls this method when a patch of a particular type needs to be executed.
 void setConnection(java.sql.Connection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlScriptRunner

public SqlScriptRunner()
A constructor for this class.

Method Detail

execute

public void execute(java.io.File file)
             throws java.lang.Exception
Description copied from interface: ScriptRunner
The upgrader tool calls this method when a patch of a particular type needs to be executed. This is where the runner class needs to add the logic of handling the file.

Specified by:
execute in interface ScriptRunner
Parameters:
file - the file to be processed
Throws:
java.lang.Exception - when an error is encountered

setConnection

public void setConnection(java.sql.Connection connection)


Copyright © 2009 CafeSip.org. All Rights Reserved.