Experimenting with Spring-JDBC. I am using this as reference. I am trying to get a list of actors who have the same last name. Running this code gave me the desired results:
String query = "SELECT FIRSTNAME FROM ACTORS WHERE LASTNAME in (:LASTNAME)";
Set ids = ....;
MapSqlParameterSource parameters = new MapSqlParameterSource();
parameters.addValue("LASTNAME", ids);
this.namedparameterJdbcTemplate.query(query, parameters);