title: Spring Batch - Pass all data between reader processor and writer
body: <p>I'm curious how one would manage to pass all available data from the reader down through the pipeline. </p>
  
  <p>e.g. I want the reader to pull all the data in and pass the entire result set down to the processor and the writer. The result set is small, I'm not worried about resources. I thought I had implemented this properly by having all of the components (reader, writer, processor) receive and return a collection of the processed item.</p>
  
  <p>While the results of the process appears to be fine, what I am seeing is that the job is reading everything in, passing it down through the pipeline and then it returns to the reader, reads everything and passes it down and so on.</p>
  
  <p>I've considered creating an extra step to read all the data in and pass it down to a subsequent step, but I'm curious if I can do this and how</p>
  
  <p>The job looks like</p>
  
  <pre><code>@Bean
  Job job() throws Exception {
      return jobs.get("job").start(step1()).build()
  }
  @Bean
  protected Step step1() throws Exception {
      return steps.get("step1").chunk(10)
      .reader(reader()
      .processor(processor()
      .writer(writer()).build()
  </code></pre>
  
  <p>//....</p>
  
  <p>The reader, processor and writer accept and return a List, e.g.</p>
  
  <pre><code>class DomainItemProcessor implements ItemProcessor&lt;List&lt;Domain&gt;, List&lt;Domain&gt;&gt;{
  </code></pre>