public class CheckDatabaseTableExists extends DiagnosticTask
<checkdatabasetableexists name="BUZ.CUSTOMERS" datasource="BusinessDs" />If the count(*) implies a heavy load then alternatively you can specifiy a different query name. Possible values are: IN_ALL_TABLES (Oracle), FETCH_FIRST (ANSI), COUNT (default)
<checkdatabasetableexists name="BUZ.CUSTOMERS" datasource="BusinessDs" queryname="IN_ALL_TABLES" />
PARAMETER_COMMENT, PARAMETER_REPORT, PARAMETER_SEVERITY, PARAMETER_TIMEOUT, PARAMETER_VARIABLE
Constructor and Description |
---|
CheckDatabaseTableExists() |
Modifier and Type | Method and Description |
---|---|
String |
getDatasource() |
String |
getDescription()
Return the description of this task.
|
String |
getQuery() |
String |
getQueryTemplate() |
String |
getTableName() |
void |
initializeFromAttributes(Attributes attributes)
This method is sent from the SelfDiagnoseHandler when a configuration is being processed.
|
void |
run(ExecutionContext ctx,
DiagnosticTaskResult result)
Run the task.
|
void |
setDatasource(String datasource) |
void |
setQueryTemplate(String queryTemplate) |
void |
setTableName(String tableName) |
void |
setUp(ExecutionContext ctx)
Override this method to verify that task parameters are initialized/set correctly.
|
createResult, getComment, getDefaultReportTemplate, getRequestor, getSeverity, getTaskName, getTimeoutInMilliSeconds, getVariableName, hasComment, isReportResults, needsLimitedRuntime, run, run, setComment, setReportResults, setRequestor, setSeverity, setTimeoutInMilliSeconds, setVariableName
public String getDescription()
getDescription
in class DiagnosticTask
public void setUp(ExecutionContext ctx) throws DiagnoseException
DiagnosticTask
setUp
in class DiagnosticTask
ctx
- ExecutionContextDiagnoseException
public void run(ExecutionContext ctx, DiagnosticTaskResult result) throws DiagnoseException
DiagnosticTask
run
in class DiagnosticTask
ctx
- ExecutionContextresult
- DiagnosticTaskResultDiagnoseException
public void initializeFromAttributes(Attributes attributes)
DiagnosticTask
initializeFromAttributes
in class DiagnosticTask
attributes
- org.xml.sax.Attributespublic String getQuery()
public String getDatasource()
public void setDatasource(String datasource)
public String getTableName()
public void setTableName(String tableName)
public String getQueryTemplate()
public void setQueryTemplate(String queryTemplate)
Copyright © 2016. All rights reserved.