code: public static void checkedUpdate (PreparedStatement stmt, int expectedCount)
          throws SQLException, PersistenceException
      {
          int modified = stmt.executeUpdate();
          if (modified != expectedCount) {
              String err = "Statement did not modify expected number of rows [stmt=" + stmt +
                  ", expected=" + expectedCount + ", modified=" + modified + "]";
              throw new PersistenceException(err);
          }
      }
docs: Calls <code>stmt.executeUpdate()</code> on the supplied statement, checking to see that it
  returns the expected update count and throwing a persistence exception if it does not.