title: Update, Insert and delete in one spring boot PUT Request jdbcTemplate
body: <p>In a Put Request the JSON file should be checked for all entries and this should be compared with the database.
  I have a variable that has the last database entry, e.g. the database has two entries, but there are three entries in the JSON file.
  In this batchUpdate the query creates three entries, but I only want to add the last (the third) entry.
  How can I do this?</p>
  <p>If I use an
  <code>If( i &gt;= db.size()) </code>
  the query creates three entries or it says the two entries are missing</p>
  <p>I could change the <code>Company company</code> and delete the two entries there, but how do I do that?</p>
  <pre><code>   new BatchPreparedStatementSetter() {
  
  
                  public void setValues(@NonNull PreparedStatement ps, int i) throws SQLException {
                  
                          ps.setInt(1, employeeId);
                          ps.setString(2, company.getEmployee().get(i).getFirstName());
                          ps.setString(3, company.getEmployee().get(i).getSurName());
                          ps.setString(4, company.getEmployee().get(i).getPhoneNumber());
                          ps.setString(5, company.getEmployee().get(i).getMobileNumber());
                          ps.setString(6, company.getEmployee().get(i).getFaxNumber());
                          ps.setString(7, company.getEmployee().get(i).getMailAddress());
  
                  }
  </code></pre>