public class SpringExceptionTranslator extends Object implements SQLExceptionTranslator
SpringExceptionTranslator is an SQLExceptionTranslator implementation which uses Spring's
exception translation functionality internally
Usage example
Configuration configuration = new Configuration(templates);
configuration.setExceptionTranslator(new SpringExceptionTranslator());
| Constructor and Description |
|---|
SpringExceptionTranslator() |
SpringExceptionTranslator(org.springframework.jdbc.support.SQLExceptionTranslator translator) |
| Modifier and Type | Method and Description |
|---|---|
RuntimeException |
translate(SQLException e)
Translate the given SQLException
|
RuntimeException |
translate(String sql,
List<Object> bindings,
SQLException e)
Translate the given SQLException
|
public SpringExceptionTranslator()
public SpringExceptionTranslator(org.springframework.jdbc.support.SQLExceptionTranslator translator)
public RuntimeException translate(String sql, List<Object> bindings, SQLException e)
SQLExceptionTranslatortranslate in interface SQLExceptionTranslatorsql - SQL stringbindings - bindinge - SQLException to translatepublic RuntimeException translate(SQLException e)
SQLExceptionTranslatortranslate in interface SQLExceptionTranslatore - SQLException to translateCopyright © 2007–2016 Querydsl. All rights reserved.