title: Spring: Generic RowMapper for dynamic queries
body: <p>I am using SpringBatch to read from Oracle and write into ElasticSearch.</p>
  <p>My code works fine for static queries.
  Example:  <em><code>select emp_id, emp_name from employee_table</code></em> I have a RowMapper class that maps the values from resultSet with the Employee POJO.</p>
  <p><strong>My requirement is</strong></p>
  <p>The query will be input by the user. So the query might be as follows</p>
  <ol>
  <li><em><code>select emp_id, emp_name from employee_table</code></em></li>
  <li><em><code>select cust_id, cust_name, cust_age from customer_table</code></em></li>
  <li><em><code>select door_no, street_name, loc_name, city from address_table</code></em></li>
  <li><em><code>Similar queries</code></em></li>
  </ol>
  <p><strong>My questions are</strong></p>
  <ol>
  <li>Is there a way to dynamically create a POJO according to the query given by the user?</li>
  <li>Will the RowMapper concept work if the query keeps changing as in my case?</li>
  <li>Is there something like a generic rowmapper?</li>
  </ol>
  <p>Sample code would be much appreciated.</p>