Example usage for org.springframework.batch.item.database JdbcCursorItemReader afterPropertiesSet

List of usage examples for org.springframework.batch.item.database JdbcCursorItemReader afterPropertiesSet

Introduction

In this page you can find the example usage for org.springframework.batch.item.database JdbcCursorItemReader afterPropertiesSet.

Prototype

@Override
public void afterPropertiesSet() throws Exception 

Source Link

Document

Assert that mandatory properties are set.

Usage

From source file:io.pivotal.dataflow.task.app.jdbcgemfire.common.JdbcGemfireConfiguration.java

@Bean
@StepScope//from w w w .ja va2 s  .  c om
public JdbcCursorItemReader<Map<String, Object>> jdbcCursorItemReader() throws Exception {
    JdbcCursorItemReader<Map<String, Object>> jdbcCursorItemReader = new JdbcCursorItemReader<>();
    JdbcColumnToPojoRowMapper rowMapper = new JdbcColumnToPojoRowMapper();
    jdbcCursorItemReader.setDataSource(this.jdbcGemfireDataSource);
    jdbcCursorItemReader.setSql(this.props.getSql());
    jdbcCursorItemReader.setFetchSize(this.props.getCommitInterval());
    jdbcCursorItemReader.setRowMapper(rowMapper);
    jdbcCursorItemReader.afterPropertiesSet();
    return jdbcCursorItemReader;
}