title: JdbcTemplate queryForInt/Long is deprecated in Spring 3.2.2. What should it be replaced by?
body: <p>The queryforInt/queryforLong methods in JdbcTemplate are deprecated in Spring 3.2. I can't find out why or what is considered the best practice to replace existing code using these methods.</p>
  
  <p>A typical method:</p>
  
  <pre><code>int rowCount = jscoreJdbcTemplate.queryForInt(
      "SELECT count(*) FROM _player WHERE nameKey = ? AND teamClub = ?",
      playerNameKey.toUpperCase(),
      teamNameKey.toUpperCase()
  );
  </code></pre>
  
  <p>OK the above method needs to be re-written as follows:</p>
  
  <pre><code>Object[] params = new Object[] { 
     playerNameKey.toUpperCase(), 
     teamNameKey.toUpperCase()
  };
  int rowCount = jscoreJdbcTemplate.queryForObject(
      "SELECT count(*) FROM _player WHERE nameKey = ? AND teamClub = ?",
      params, Integer.class);
  </code></pre>
  
  <p>Obviously this deprecation makes the JdbcTemplate class simpler (or does it?). QueryForInt was always a convenience method (I guess) and has been around a long time. Why has it been removed. The code becomes more complicated as a result.</p>