title: How to implement Update if Exist else INSERT in Spring Batch
body: <p>My Batch reads data from one table, processes and writes to another table.
  I have MyBatisPagingITemReader, Custom Processor and Writer.</p>
  
  <p>Currently Custom Writer INSERTS the data which is converted in processor and Writer does a BATCH INSERT to the other table.</p>
  
  <p>Now, Reader will read some rows which has to be updated in the other table.In this case my writer should also be capable of batch updating those records.</p>
  
  <p>What is the best way to implement it?</p>
  
  <p>Here is where iam stuck 
  My Writer </p>
  
  <pre><code> public void write(final List unmodifiableItems) throws Exception {
   // unmodifiable items will be a list of row to be inserted.....
      }
  </code></pre>
  
  <p>How will i access the list of records which needs to be UPDATED?</p>