/** * Configures a {@link PreparedStatementSetter} that will use the List as the values * to be set on the query to be executed for this reader. * * @param args values to set on the query * @return this instance for method chaining * @throws Exception from {@link InitializingBean#afterPropertiesSet()} */ public JdbcCursorItemReaderBuilder<T> queryArguments(List<?> args) throws Exception { ListPreparedStatementSetter listPreparedStatementSetter = new ListPreparedStatementSetter(args); listPreparedStatementSetter.afterPropertiesSet(); this.preparedStatementSetter = listPreparedStatementSetter; return this; }
@Transactional @Test(expected = IllegalArgumentException.class) public void testAfterPropertiesSet() throws Exception { pss = new ListPreparedStatementSetter(null); pss.afterPropertiesSet(); }
/** * Configures a {@link PreparedStatementSetter} that will use the List as the values * to be set on the query to be executed for this reader. * * @param args values to set on the query * @return this instance for method chaining * @throws Exception from {@link InitializingBean#afterPropertiesSet()} */ public JdbcCursorItemReaderBuilder<T> queryArguments(List<?> args) throws Exception { ListPreparedStatementSetter listPreparedStatementSetter = new ListPreparedStatementSetter(args); listPreparedStatementSetter.afterPropertiesSet(); this.preparedStatementSetter = listPreparedStatementSetter; return this; }