Example usage for org.springframework.batch.sample.common StagingItemWriter NEW

List of usage examples for org.springframework.batch.sample.common StagingItemWriter NEW

Introduction

In this page you can find the example usage for org.springframework.batch.sample.common StagingItemWriter NEW.

Prototype

String NEW

To view the source code for org.springframework.batch.sample.common StagingItemWriter NEW.

Click Source Link

Usage

From source file:org.springframework.batch.sample.common.StagingItemReader.java

private List<Long> retrieveKeys() {

    synchronized (lock) {

        return jdbcTemplate.query(

                "SELECT ID FROM BATCH_STAGING WHERE JOB_ID=? AND PROCESSED=? ORDER BY ID",

                new RowMapper<Long>() {
                    @Override//  w  w  w . j av  a 2s  . c om
                    public Long mapRow(ResultSet rs, int rowNum) throws SQLException {
                        return rs.getLong(1);
                    }
                },

                stepExecution.getJobExecution().getJobId(), StagingItemWriter.NEW);

    }

}