@Override
protected ItemReader<Foo> createItemReader() throws Exception {
JdbcPagingItemReader<Foo> inputSource = new JdbcPagingItemReader<Foo>();
inputSource.setDataSource(dataSource);
HsqlPagingQueryProvider queryProvider = new HsqlPagingQueryProvider();
queryProvider.setSelectClause("select ID, NAME, VALUE");
queryProvider.setFromClause("from T_FOOS");
Map<String, Order> sortKeys = new LinkedHashMap<String, Order>();
sortKeys.put("VALUE", Order.ASCENDING);
sortKeys.put("NAME", Order.DESCENDING);
queryProvider.setSortKeys(sortKeys);
inputSource.setQueryProvider(queryProvider);
inputSource.setRowMapper(
new ParameterizedRowMapper<Foo>() {
@Override
public Foo mapRow(ResultSet rs, int i) throws SQLException {