Package se.ikama.bauta.batch.tasklet
Class SqlQueryReportTasklet
- java.lang.Object
-
- se.ikama.bauta.batch.tasklet.ReportTasklet
-
- se.ikama.bauta.batch.tasklet.ThymeleafReportTasklet
-
- se.ikama.bauta.batch.tasklet.SqlQueryReportTasklet
-
- All Implemented Interfaces:
org.springframework.batch.core.step.tasklet.Tasklet,org.springframework.beans.factory.InitializingBean,ReportGenerator
public class SqlQueryReportTasklet extends ThymeleafReportTasklet implements ReportGenerator, org.springframework.beans.factory.InitializingBean
A tasklet that generates reports based on a set of SQL queries.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSqlQueryReportTasklet.QueryResult
-
Field Summary
-
Fields inherited from class se.ikama.bauta.batch.tasklet.ThymeleafReportTasklet
templateEngine
-
Fields inherited from class se.ikama.bauta.batch.tasklet.ReportTasklet
failIfValidationFailures, reportDir
-
-
Constructor Summary
Constructors Constructor Description SqlQueryReportTasklet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()ReportGenerationResultgenerateReport(java.io.File reportFile, org.springframework.batch.core.StepContribution sc, org.springframework.batch.core.scope.context.ChunkContext cc)Generate a reportjava.lang.StringgetReportFilename()Name for the generated report file-
Methods inherited from class se.ikama.bauta.batch.tasklet.ThymeleafReportTasklet
getTemplateEngine, setTemplateEngine
-
Methods inherited from class se.ikama.bauta.batch.tasklet.ReportTasklet
addReportGenerator, execute, setReportGenerators
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface se.ikama.bauta.batch.tasklet.ReportGenerator
getReportName
-
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception
-
generateReport
public ReportGenerationResult generateReport(java.io.File reportFile, org.springframework.batch.core.StepContribution sc, org.springframework.batch.core.scope.context.ChunkContext cc) throws java.lang.Exception
Description copied from interface:ReportGeneratorGenerate a report- Specified by:
generateReportin interfaceReportGenerator- Parameters:
reportFile- The file to write the report tosc- The current step contributioncc- The current ChunkContext- Returns:
- A ReportGenerationResult. Typically with the status OK.
For certain types of report generators with a notion of "failure", it may make sense to return Failed, to support. See @
SqlValidationTasklet - Throws:
java.lang.Exception
-
getReportFilename
public java.lang.String getReportFilename()
Description copied from interface:ReportGeneratorName for the generated report file- Specified by:
getReportFilenamein interfaceReportGenerator
-
-