title: JdbcTemplate multiple result sets
body: <p>I am trying to find an easy way to deal with Stored Procedures / SQL returning multiple result sets. I have been using the <code>SimpleJdbcOperations#queryForList()</code> method however this will only return the first result set as a <code>List&lt;Map&lt;String, Object&gt;&gt;</code>. I need to be able to get multiple result sets, ideally as a <code>Collection</code> of <code>List&lt;Map&lt;String, Object&gt;&gt;</code> or something. The program I am writing is a middleware component so I don't know what the SQL will be, or the form of the result set.</p>
  
  <p>I think I have to use the <code>JdbcOperations</code> class which gives me access to more methods, including  <code>execute(CallableStatementCreator csc, CallableStatementCallback&lt;T&gt; action)</code> but now I am stuck.</p>
  
  <pre><code>    CallableStatementCallback&lt;T&gt; callback = new CallableStatementCallback&lt;T&gt;() {
         @Override
         public T doInCallableStatement(CallableStatement cs) throws SQLException, DataAccessException
         {
             boolean results = cs.execute(request);
             while(results)
             {
                 ResultSet result = cs.getResultSet();
                 results = cs.getMoreResults();
             }
             return null;
          }
  };
  </code></pre>
  
  <p>I am not really sure how to use the method though, or what to do with the <code>ResultSet</code> to get my generic <code>List&lt;Map&lt;String, Object&gt;&gt;</code>s.</p>