bkrapf
03-19-2008, 05:43 PM
I am doing data access with JdbcTemplate and using setExceptionTranslator to set it to a custom exception translator that I have written. I am then using the JdbcTemplate.query(String sql, RowMapper rowMapper) to execute select statements.
However, I would like to change this to use MappingSqlQuery. I have classes that extend MappingSqlQuery that take in a Datasource in the constructor. I have this setup and it works great, but this doesn't seem to use JdbcTemplate at all, and I don't see any way to set an ExceptionTranslator on MappingSqlQuery. How can I use MappingSqlQuery with my custom ExceptionTranslator?
However, I would like to change this to use MappingSqlQuery. I have classes that extend MappingSqlQuery that take in a Datasource in the constructor. I have this setup and it works great, but this doesn't seem to use JdbcTemplate at all, and I don't see any way to set an ExceptionTranslator on MappingSqlQuery. How can I use MappingSqlQuery with my custom ExceptionTranslator?