public int runUpdate() throws SQLException { // this can be a UPDATE, DELETE, or ... just not a SELECT if (!type.isOkForUpdate()) { throw new IllegalArgumentException("Cannot call update on a " + type + " statement"); } return preparedStatement.executeUpdate(); }