List of usage examples for org.springframework.jdbc.support SQLErrorCodeSQLExceptionTranslator subclass-usage
From source file net.chrisrichardson.foodToGo.util.spring.MyOracleSQLExceptionTranslator.java
public class MyOracleSQLExceptionTranslator extends SQLErrorCodeSQLExceptionTranslator { protected DataAccessException customTranslate(String task, String sql, SQLException sqlex) { switch (sqlex.getErrorCode()) { case 8177: return new CannotSerializeTransactionException("Can't serialize", sqlex);
From source file org.nextframework.persistence.exception.PostgreSQLErrorCodeSQLExceptionTranslator.java
public class PostgreSQLErrorCodeSQLExceptionTranslator extends SQLErrorCodeSQLExceptionTranslator { static String errorRegexInglesNull = "ERROR: null value in column \"(.*)\" violates not-null constraint"; static Pattern patternInglesNull = Pattern.compile(errorRegexInglesNull); static String errorRegexNull = "ERRO: valor nulo na coluna \"(.*)\" viola a restrio no-nula"; static Pattern patternNull = Pattern.compile(errorRegexNull);
From source file org.nextframework.persistence.exception.SQLServerSQLErrorCodeSQLExceptionTranslator.java
public class SQLServerSQLErrorCodeSQLExceptionTranslator extends SQLErrorCodeSQLExceptionTranslator { static String errorRegex = "(.*) statement conflicted with COLUMN (?:SAME TABLE )?REFERENCE constraint '(.*?)'. The conflict occurred in database '(?:.*?)', table '(.*?)', column '(.*?)'."; static String errorRegex2 = "The (.*) statement conflicted with the REFERENCE constraint \"(.*)\". The conflict occurred in database \"(?:.*)\", table \"(.*)\", column '(.*)'."; static Pattern pattern = Pattern.compile(errorRegex); static Pattern pattern2 = Pattern.compile(errorRegex2);
From source file org.nextframework.persistence.exception.OracleSQLErrorCodeSQLExceptionTranslator.java
public class OracleSQLErrorCodeSQLExceptionTranslator extends SQLErrorCodeSQLExceptionTranslator { static String errorRegex = "ORA-(?:\\d*?): restrio de integridade \\((.*)?\\) violada - registro filho localizado\n"; static String errorRegexIngles = "ORA-(?:\\d*?): integrity constraint \\((.*)?\\) violated - child record found\n"; // static String errorRegex = "(.*) statement conflicted with COLUMN REFERENCE constraint '(.*?)'. The conflict occurred in database '(?:.*?)', table '(.*?)', column '(.*?)'."; static Pattern pattern = Pattern.compile(errorRegex);
From source file org.nextframework.persistence.exception.FirebirdSQLErrorCodesTranslator.java
public class FirebirdSQLErrorCodesTranslator extends SQLErrorCodeSQLExceptionTranslator { static String errorRegex = "GDS Exception. 335544466. violation of FOREIGN KEY constraint \"(.*)?\" on table \"(.*)?\""; static Pattern pattern = Pattern.compile(errorRegex); static final Log log = LogFactory.getLog(FirebirdSQLErrorCodesTranslator.class);