title: Spring JdbcTemplate and NamedParameterJdbcTemplate
body: <p>Is it advisable to use <code>JDBCTemplate</code> and <code>NamedParameterJdbcTemplate</code> together with an idea that <code>NamedParameterJdbcTemplate</code> is used for inserting/updating while <code>JdbcTemplate</code> takes care of retrieving and deleting? Because I can insert objects by using <code>NamedParameterJdbcTemplate</code> as simple as shown below:</p>
  
  <pre><code>public long save(Domain obj) {
  
      String sql = "insert into domain(name,password,salt,dnspod_domain_id,status)" +
              " values(:name,:password,:salt,:dnspodDomainId,:status)";
  
      KeyHolder keyHolder = new GeneratedKeyHolder();
      namedJdbc.update(sql, new BeanPropertySqlParameterSource(obj), keyHolder);
  
      return keyHolder.getKey().longValue();
  }
  </code></pre>
  
  <p>If I want to insert objects/data into table by using <code>JDBCTemplate</code>, I will have to write lot of code manually assigning parameters with <code>PreparedStatement</code>...</p>
  
  <p>When it comes to retrieving, I can do it by <code>JDBCTemplate</code> as shown below:</p>
  
  <pre><code>List&lt;User&gt; users = jdbcTemplate.query("SELECT * FROM user", BeanPropertyRowMapper.newInstance(User.class));
  </code></pre>
  
  <p>No need to use <code>ResultSet</code> along with <code>RowMapper</code> to retrieve rows. </p>
  
  <p>My concern is that if there are any performance issues using <code>JDBCTemplate</code> and <code>NamedParameterJdbcTemplate</code> together.</p>