public class SuppressSQLErrorCodesTranslator extends SQLErrorCodeSQLExceptionTranslator
SQLErrorCodeSQLExceptionTranslator
suppressing errors based on
configured list of codes by throwing dedicated SuppressDataAccessException
.Constructor and Description |
---|
SuppressSQLErrorCodesTranslator(int errorCode)
Instantiates a new suppress SQL error codes translator.
|
SuppressSQLErrorCodesTranslator(List<Integer> errorCodes)
Instantiates a new suppress SQL error codes translator.
|
Modifier and Type | Method and Description |
---|---|
protected DataAccessException |
customTranslate(String task,
String sql,
SQLException sqlEx) |
createCustomException, doTranslate, getSqlErrorCodes, setDatabaseProductName, setDataSource, setSqlErrorCodes
buildMessage, getFallbackTranslator, setFallbackTranslator, translate
public SuppressSQLErrorCodesTranslator(int errorCode)
errorCode
- the error codeprotected DataAccessException customTranslate(String task, String sql, SQLException sqlEx)
customTranslate
in class SQLErrorCodeSQLExceptionTranslator
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.