|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ddlutils.task.Command
public abstract class Command
Base class for commands that work with a model.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
_log
The log. |
Constructor Summary | |
---|---|
Command()
|
Method Summary | |
---|---|
abstract void |
execute(DatabaseTaskBase task,
Database model)
Executes this command. |
protected void |
handleException(java.lang.Exception ex,
java.lang.String msg)
Handles the given exception according to the fail-on-error setting by either re-throwing it (wrapped in a build exception) or only logging it. |
boolean |
isFailOnError()
Determines whether the command execution will be stopped upon an error. |
abstract boolean |
isRequiringModel()
Specifies whether this command requires a model, i.e. |
void |
setFailOnError(boolean failOnError)
Specifies whether the execution shall stop if an error has occurred during the task runs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log _log
Constructor Detail |
---|
public Command()
Method Detail |
---|
public boolean isFailOnError()
true
.
true
if the execution stops in case of an errorpublic void setFailOnError(boolean failOnError)
failOnError
- true
if the execution shall stop in case of an errorprotected void handleException(java.lang.Exception ex, java.lang.String msg) throws org.apache.tools.ant.BuildException
ex
- The exceptionmsg
- The message to use unless this the exception is rethrown and it is
already a build exception
org.apache.tools.ant.BuildException
public abstract boolean isRequiringModel()
execute(DatabaseTaskBase, Database)
cannot be null
.
true
if this command requires a modelpublic abstract void execute(DatabaseTaskBase task, Database model) throws org.apache.tools.ant.BuildException
task
- The executing taskmodel
- The database model
org.apache.tools.ant.BuildException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |