org.dbmaintain.script.runner.impl
Class SqlPlusScriptRunner

java.lang.Object
  extended by org.dbmaintain.script.runner.impl.BaseNativeScriptRunner
      extended by org.dbmaintain.script.runner.impl.SqlPlusScriptRunner
All Implemented Interfaces:
ScriptRunner

public class SqlPlusScriptRunner
extends BaseNativeScriptRunner

Implementation of a script runner that uses Oracle's SQL plus.

Author:
Tim Ducheyne, Filip Neven

Field Summary
protected  Application application
           
protected  String sqlPlusCommand
           
 
Fields inherited from class org.dbmaintain.script.runner.impl.BaseNativeScriptRunner
databases
 
Constructor Summary
SqlPlusScriptRunner(Databases databases, String sqlPlusCommand)
           
 
Method Summary
protected  Application createApplication(String sqlPlusCommand)
           
protected  void executeScript(File scriptFile, Database targetDatabase)
           
protected  File generateWrapperScriptFile(DatabaseInfo databaseInfo, File targetScriptFile)
           
protected  String getDatabaseConfigFromJdbcUrl(String url)
           
protected  String getTemporaryScriptName(Script script)
          Oracle does not support blanks in file names, so remove them from the temp file name.
 
Methods inherited from class org.dbmaintain.script.runner.impl.BaseNativeScriptRunner
close, createTemporaryScriptFile, createTemporaryScriptsDir, execute, getTargetDatabaseDatabase, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

application

protected Application application

sqlPlusCommand

protected String sqlPlusCommand
Constructor Detail

SqlPlusScriptRunner

public SqlPlusScriptRunner(Databases databases,
                           String sqlPlusCommand)
Method Detail

executeScript

protected void executeScript(File scriptFile,
                             Database targetDatabase)
                      throws Exception
Specified by:
executeScript in class BaseNativeScriptRunner
Throws:
Exception

generateWrapperScriptFile

protected File generateWrapperScriptFile(DatabaseInfo databaseInfo,
                                         File targetScriptFile)
                                  throws IOException
Throws:
IOException

getTemporaryScriptName

protected String getTemporaryScriptName(Script script)
Oracle does not support blanks in file names, so remove them from the temp file name.

Overrides:
getTemporaryScriptName in class BaseNativeScriptRunner
Parameters:
script - The script that is going to be executed, not null
Returns:
The file name without spaces, not null

createApplication

protected Application createApplication(String sqlPlusCommand)

getDatabaseConfigFromJdbcUrl

protected String getDatabaseConfigFromJdbcUrl(String url)


Copyright © 2011. All Rights Reserved.