use of org.baeldung.taskletsvschunks.model.Line in project tutorials by eugenp.
the class LinesWriter method beforeStep.
@Override
public void beforeStep(StepExecution stepExecution) {
ExecutionContext executionContext = stepExecution.getJobExecution().getExecutionContext();
this.lines = (List<Line>) executionContext.get("lines");
fu = new FileUtils("output.csv");
logger.debug("Lines Writer initialized.");
}
use of org.baeldung.taskletsvschunks.model.Line in project tutorials by eugenp.
the class LinesWriter method execute.
@Override
public RepeatStatus execute(StepContribution stepContribution, ChunkContext chunkContext) throws Exception {
for (Line line : lines) {
fu.writeLine(line);
logger.debug("Wrote line " + line.toString());
}
return RepeatStatus.FINISHED;
}
Aggregations