title: Extract data using spring jdbctemplate to load in a different database
body: <p>I need to extract data from some random tables from my database, and insert into similar tables in a different database.</p>
  
  <p>I am not clear as to how I can write a generic method which can handle all the tables.</p>
  
  <pre><code>this.jdbcTemplate.query("select * from TableName", new RowMapper() {
           @Override
           public Object mapRow(ResultSet resultSet, int i) throws SQLException {
               while(resultSet.next()){
  //                Fetch data in a generic object for later updating in a different schema
               }
               return null;  //To change body of implemented methods use File | Settings | File Templates.
           }
       });
  </code></pre>