Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 7. Processing data > Filtering and validating items - Pg. 208

208 C HAPTER 7 Processing data class="org.springframework.batch.item.database.JdbcCursorItemReader"> (...) </bean> <bean id="processor" class="com.manning.sbia.ch07.IdToProductItemProcessor"> <property name="productDao" ref="productDao" /> Injects product DAO </bean> in item processor <bean id="productDao" class="com.manning.sbia.ch07.JdbcProductDao"> <property name="dataSource" ref="dataSource" /> </bean> <bean id="writer" (...)> (...) </bean> Declares product DAO bean The implementation of the driving query pattern with Spring Batch ends this section. We covered how to use the processing phase of a chunk-oriented step as a way to mod- ify read items and create new items. The next section covers how to use the processing phase as a way to filter read items before sending them to an item writer. 7.3 Filtering and validating items The processing phase of a chunk-oriented step not only can modify read items but