Using prepared statements with JDBCTemplate
I'm using the JDBC template and want to read from a database using prepared statements. I iterate over many lines in a .csv file, and on every line I execute some SQL select queries with corresponding values. I want to speed up my reading from the database but I don't know how to get the JDBC template to work with prepared statements. There is the PreparedStatementCreator and the PreparedStatementSetter . As in this example both of them are created with anonymous inner classes. But inside the PreparedStatementSetter class I don't have access to the values I want to set in the prepared