public abstract class AbstractTaskGroup extends Object implements ITaskGroup
Constructor and Description |
---|
AbstractTaskGroup()
Either set the tasks using constructor or set using getter.
|
AbstractTaskGroup(ITask[] tasks) |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Get description of the task.
|
ITask[] |
getTasks()
Get the tasks that this package consists of.
|
void |
run(IContext context)
Run the task using provided context.
|
void |
setLogPrefix(String prefix)
Set the prefix for log messages.
|
boolean |
shouldRun(IContext context)
Check if the task should run.
|
static boolean |
sql(IContext context,
String sql)
Executes the given SQL statement
|
public AbstractTaskGroup()
public AbstractTaskGroup(ITask[] tasks)
public ITask[] getTasks()
ITaskGroup
getTasks
in interface ITaskGroup
public void setLogPrefix(String prefix)
ITask
setLogPrefix
in interface ITask
prefix
- Log message prefixpublic String getDescription()
ITask
getDescription
in interface ITask
public void run(IContext context) throws Throwable
ITask
public boolean shouldRun(IContext context)
ITask
public static boolean sql(IContext context, String sql) throws SQLException, Throwable
context
- Context containing connectionsql
- SQL statementSQLException
- SQL ExceptionsThrowable
- Driver exceptionsCopyright © 2021. All rights reserved.