code: public static void warnedUpdate (PreparedStatement stmt, int expectedCount)
          throws SQLException
      {
          int modified = stmt.executeUpdate();
          if (modified != expectedCount) {
              log.warning("Statement did not modify expected number of rows", "stmt", stmt,
                          "expected", expectedCount, "modified", modified);
          }
      }
docs: Calls <code>stmt.executeUpdate()</code> on the supplied statement, checking to see that it
  returns the expected update count and logging a warning if it does not.