Search in sources :

Example 1 with FileUtils

use of org.baeldung.taskletsvschunks.utils.FileUtils in project tutorials by eugenp.

the class LinesWriter method beforeStep.

@Override
public void beforeStep(StepExecution stepExecution) {
    fu = new FileUtils("output.csv");
    logger.debug("Line Writer initialized.");
}
Also used : FileUtils(org.baeldung.taskletsvschunks.utils.FileUtils)

Example 2 with FileUtils

use of org.baeldung.taskletsvschunks.utils.FileUtils in project tutorials by eugenp.

the class LineReader method beforeStep.

@Override
public void beforeStep(StepExecution stepExecution) {
    fu = new FileUtils("taskletsvschunks/input/tasklets-vs-chunks.csv");
    logger.debug("Line Reader initialized.");
}
Also used : FileUtils(org.baeldung.taskletsvschunks.utils.FileUtils)

Example 3 with FileUtils

use of org.baeldung.taskletsvschunks.utils.FileUtils in project tutorials by eugenp.

the class LinesReader method beforeStep.

@Override
public void beforeStep(StepExecution stepExecution) {
    lines = new ArrayList<Line>();
    fu = new FileUtils("taskletsvschunks/input/tasklets-vs-chunks.csv");
    logger.debug("Lines Reader initialized.");
}
Also used : Line(org.baeldung.taskletsvschunks.model.Line) FileUtils(org.baeldung.taskletsvschunks.utils.FileUtils)

Example 4 with FileUtils

use of org.baeldung.taskletsvschunks.utils.FileUtils 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.");
}
Also used : Line(org.baeldung.taskletsvschunks.model.Line) ExecutionContext(org.springframework.batch.item.ExecutionContext) FileUtils(org.baeldung.taskletsvschunks.utils.FileUtils)

Aggregations

FileUtils (org.baeldung.taskletsvschunks.utils.FileUtils)4 Line (org.baeldung.taskletsvschunks.model.Line)2 ExecutionContext (org.springframework.batch.item.ExecutionContext)1