public class ScriptRunner extends Object
| Constructor and Description |
|---|
ScriptRunner(Connection conn) |
ScriptRunner(Connection connection,
boolean autoCommit,
boolean stopOnError)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
runScript(Reader reader)
Runs an SQL script (read in using the Reader parameter).
|
void |
setDelimiter(String delimiter,
boolean fullLineDelimiter) |
void |
setErrorLogWriter(PrintWriter errorLogWriter)
Setter for errorLogWriter property.
|
void |
setLogWriter(PrintWriter logWriter)
Setter for logWriter property.
|
public ScriptRunner(Connection connection, boolean autoCommit, boolean stopOnError)
connection - autoCommit - stopOnError - public ScriptRunner(Connection conn)
public void setDelimiter(String delimiter, boolean fullLineDelimiter)
delimiter - fullLineDelimiter - public void setLogWriter(PrintWriter logWriter)
logWriter - - the new value of the logWriter propertypublic void setErrorLogWriter(PrintWriter errorLogWriter)
errorLogWriter - - the new value of the errorLogWriter propertypublic void runScript(Reader reader) throws IOException, SQLException
reader - - the source of the scriptSQLException - if any SQL errors occurIOException - if there is an error reading from the ReaderCopyright © 2016. All Rights Reserved.