title: Return Type for jdbcTemplate.queryForList(sql, object, classType)
body: <p>I'm executing a named query using jdbcTemplate.queryForList in the following manner:</p>
  
  <pre><code>List&lt;Conversation&gt; conversations = jdbcTemplate.queryForList(
              SELECT_ALL_CONVERSATIONS_SQL_FULL,
              new Object[] {userId, dateFrom, dateTo});
  </code></pre>
  
  <p>The SQL query is:</p>
  
  <pre><code>private final String SELECT_ALL_CONVERSATIONS_SQL_FULL = 
      "select conversation.conversationID, conversation.room, " +
      "conversation.isExternal, conversation.startDate, " +
      "conversation.lastActivity, conversation.messageCount " +
      "from openfire.ofconversation conversation " +
      "WHERE conversation.conversationid IN " +
      "(SELECT conversation.conversationID " +
      "FROM openfire.ofconversation conversation, " +
      "openfire.ofconparticipant participant " +
      "WHERE conversation.conversationID = participant.conversationID " +
      "AND participant.bareJID LIKE ? " +
      "AND conversation.startDate between ? AND ?)";
  </code></pre>
  
  <p>But when extracting the content of the list in the following manner: </p>
  
  <pre><code>for (Conversation conversation : conversations) {
  builder.append(conversation.getId());
              builder.append(",");
              builder.append(conversation.getRoom());
              builder.append(",");
              builder.append(conversation.getIsExternal());
              builder.append(",");
              builder.append(conversation.getStartDate());            
              builder.append(",");            
              builder.append(conversation.getEndDate());
              builder.append(",");  
              builder.append(conversation.getMsgCount());
              out.write(builder.toString()); 
  }
  </code></pre>
  
  <p>I get an error: </p>
  
  <pre><code>java.util.LinkedHashMap cannot be cast to net.org.messagehistory.model.Conversation
  </code></pre>
  
  <p>How do I convert this linkedMap into the desired Object??</p>
  
  <p>Thanks</p>