org.logicalcobwebs.dbscript
Class Commander
java.lang.Object
org.logicalcobwebs.dbscript.Commander
- All Implemented Interfaces:
- java.lang.Runnable
class Commander
- extends java.lang.Object
- implements java.lang.Runnable
A thread that can run a single command many times.
- Since:
- Proxool 0.5
- Version:
- $Revision: 1.6 $, $Date: 2003/03/03 11:12:03 $
- Author:
- Bill Horsman (bill@logicalcobwebs.co.uk), $Author: billhorsman $ (current maintainer)
Method Summary |
private static void |
execute(java.sql.Connection connection,
java.lang.String sql)
Execute and SQL statement |
protected boolean |
isFinished()
Is the thread running |
void |
run()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
private static final Log LOG
adapter
private ConnectionAdapterIF adapter
command
private CommandIF command
commandFilter
private CommandFilterIF commandFilter
finished
private boolean finished
Commander
public Commander(ConnectionAdapterIF adapter,
CommandIF commandIF,
CommandFilterIF commandFilter)
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
isFinished
protected boolean isFinished()
- Is the thread running
- Returns:
- true if it's finished, else false
execute
private static final void execute(java.sql.Connection connection,
java.lang.String sql)
throws java.sql.SQLException
- Execute and SQL statement
- Parameters:
connection
- used to execute statementsql
- the SQL to perform
- Throws:
java.sql.SQLException
- if anything goes wrong