Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.admin.sql
Class RunSQLScript

    java.lang.Object
      oracle.ifs.admin.sql.RunSQLScript

    public class RunSQLScript

extends java.lang.Object

Provides a simple way to run SQL scripts.

(Unpublished)
Modified:
  sgarg 02/24/2002 Changed stopOnErrors argument to false as that is what the default behavior should be, lsaenz 08/17/2000 Changed stopOnErrors argument to true., lsaenz 08/11/2000 Updated comments., lsaenz 07/06/2000 Added constructor with no log., lsaenz 12/02/1999 Made default values for sqlFile and sqlLogFile == "" instead of null., lsaenz 11/17/1999 Made class extend DatabaseAction., lsaenz 11/16/1999 Created.

Field Summary
`protected java.lang.String` | `sqlFile` The SQL file to execute.
`protected java.lang.String` | `sqlLogFile` The log file to record SQL statements that have been executed.
`protected java.util.Hashtable` | `symbols` The symbols that need to be replaced in the SQL file.

Constructor Summary
`RunSQLScript()` Creates a new RunSQLScript.
`RunSQLScript(java.lang.String file)` Creates a new RunSQLScript.
`RunSQLScript(java.lang.String file, java.lang.String log)` Creates a new RunSQLScript class.
`RunSQLScript(java.lang.String file, java.lang.String log, java.util.Hashtable symbols)` Creates a new RunSQLScript given a Hashtable with symbol to value mappings for the symbols that need to be replaced in the SQL script.

Method Summary
`void` | `execute(java.sql.Connection con)`
`void` | `execute(java.sql.Connection con, java.lang.String connectString)` Runs a SQL script.
`void` | `setSQLFile(java.lang.String file)`
`void` | `setSQLLogFile(java.lang.String log)`
`void` | `setSymbols(java.util.Hashtable symbols)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sqlFile

    protected java.lang.String sqlFile

  Description copied from class: `RunSQLScript`
  The SQL file to execute.

  (Unpublished)

### sqlLogFile

    protected java.lang.String sqlLogFile

  Description copied from class: `RunSQLScript`
  The log file to record SQL statements that have been executed.

  (Unpublished)

### symbols

    protected java.util.Hashtable symbols

  Description copied from class: `RunSQLScript`
  The symbols that need to be replaced in the SQL file.

  (Unpublished)

Constructor Detail

### RunSQLScript

    public RunSQLScript()

  Creates a new RunSQLScript.

  (Unpublished)

### RunSQLScript

    public RunSQLScript(java.lang.String file)

  Creates a new RunSQLScript.

  Parameters:
    `file` - the SQL file to execute.
  (Unpublished)

### RunSQLScript

    public RunSQLScript(java.lang.String file,
                        java.lang.String log)

  Creates a new RunSQLScript class.

  Parameters:
    `file` - the SQL file to execute.
    `log` - the log file to use.
  (Unpublished)

### RunSQLScript

    public RunSQLScript(java.lang.String file,
                        java.lang.String log,
                        java.util.Hashtable symbols)

  Creates a new RunSQLScript given a Hashtable with symbol to value mappings for the symbols that need to be replaced in the SQL script.

  Parameters:
    `file` - the SQL file to execute.
    `log` - the log file to use.
    `symbols` - the symbols (mapped to values) to replace.
  (Unpublished)

Method Detail

### setSQLFile

    public void setSQLFile(java.lang.String file)

### setSQLLogFile

    public void setSQLLogFile(java.lang.String log)

### setSymbols

    public void setSymbols(java.util.Hashtable symbols)

### execute

    public void execute(java.sql.Connection con,
                        java.lang.String connectString)
                 throws java.sql.SQLException,
                        SQLProcessorException,
                        java.io.IOException

  Description copied from class: `RunSQLScript`
  Runs a SQL script.
  Note: the Connection is closed after running the script.

  Parameters:
    `con` - the JDBC Connection to use.
  Throws:
    `java.sql.SQLException` - if a SQL command fails.
    `SQLProcessorException` - if processing the script fails.
    `java.io.IOException` - if an IO error occurs.
  (Unpublished)

### execute

    public void execute(java.sql.Connection con)
                 throws java.sql.SQLException,
                        SQLProcessorException,
                        java.io.IOException

  Throws:
    `java.sql.SQLException`
    `SQLProcessorException`
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD