|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.logicalcobwebs.dbscript.Command
class Command
An SQL command that isrun by a Script
. If load
or loops
are configured then it might run more than
once.
Field Summary | |
---|---|
private java.lang.String |
exception
|
protected static java.lang.String |
EXCEPTION_IGNORE
If this command encounters an exception it will silently ignore the exception and continue. |
protected static java.lang.String |
EXCEPTION_LOG
If this command encounters an exception it will log it at DEBUG level and continue |
protected static java.lang.String |
EXCEPTION_STOP
If this command encounters an exception it will stop executing (and if it is in a loop it will break out of the loop) |
private int |
load
|
private static Log |
LOG
|
private int |
loops
|
private java.lang.String |
name
|
private java.lang.String |
sql
|
Constructor Summary | |
---|---|
Command()
|
Method Summary | |
---|---|
int |
getLoad()
How many "threads" to simulate. |
int |
getLoops()
The number of loops to perform. |
java.lang.String |
getName()
A convenient name to call this command to help logging. |
java.lang.String |
getSql()
The SQL statement to run |
boolean |
isIgnoreException()
If true then errors that occur during this command are ignored silently and do not stop the script running. |
boolean |
isLogException()
If true then errors that occur during this command are logged as debug messages but do not stop the script running. |
void |
setException(java.lang.String exception)
|
protected void |
setLoad(int load)
|
protected void |
setLoops(int loops)
|
void |
setName(java.lang.String name)
|
protected void |
setSql(java.lang.String sql)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Log LOG
private java.lang.String name
private java.lang.String sql
private int load
private int loops
private java.lang.String exception
protected static final java.lang.String EXCEPTION_STOP
protected static final java.lang.String EXCEPTION_LOG
protected static final java.lang.String EXCEPTION_IGNORE
Constructor Detail |
---|
Command()
Method Detail |
---|
public java.lang.String getSql()
CommandIF
getSql
in interface CommandIF
CommandIF.getSql()
protected void setSql(java.lang.String sql)
getSql()
public int getLoad()
CommandIF
Script
to see how
it actually implements thread-like behaviour.
getLoad
in interface CommandIF
CommandIF.getLoad()
protected void setLoad(int load)
getLoad()
public int getLoops()
CommandIF
sql
load
times.
getLoops
in interface CommandIF
CommandIF.getLoops()
protected void setLoops(int loops)
getLoops()
public boolean isIgnoreException()
CommandIF
script
running.
isIgnoreException
in interface CommandIF
CommandIF.isIgnoreException()
public boolean isLogException()
CommandIF
script
running.
isLogException
in interface CommandIF
CommandIF.isIgnoreException()
public void setException(java.lang.String exception)
isIgnoreException()
public java.lang.String getName()
CommandIF
getName
in interface CommandIF
CommandIF.getName()
public void setName(java.lang.String name)
getName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |