title: When to use Map and SqlParameterSource in namedParameterJdbcTemplate?
body: <pre><code>String SQL = "INSERT INTO Employee (name, age, salary) VALUES (:name,:age,:salary)";
  Map namedParameters = new HashMap();   
  namedParameters.put("name", name);   
  namedParameters.put("age", age);
  namedParameters.put("salary", salary);
  namedParameterJdbcTemplate.update(SQL, namedParameters);
  
  String SQL = "UPDATE Employee SET age = :age WHERE empid = :empid";
  SqlParameterSource namedParameters = new MapSqlParameterSource();
  namedParameters.addValue("age", age);
  namedParameters.addValue("empid", empid);
  namedParameterJdbcTemplate.update(SQL, namedParameters);
  </code></pre>
  
  <p>Seems both Map and SqlParameterSource are same. But why did API developers added these API's ? Is there any particular scenario to use Map or SqlParameterSource which makes execution faster? Please explain me clearly. Thanks in advance.</p>