public class SuppressSQLErrorCodesTranslator
extends org.springframework.jdbc.support.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 org.springframework.dao.DataAccessException |
customTranslate(String task,
String sql,
SQLException sqlEx) |
createCustomException, doTranslate, getSqlErrorCodes, setDatabaseProductName, setDataSource, setSqlErrorCodes
public SuppressSQLErrorCodesTranslator(int errorCode)
errorCode
- the error codeprotected org.springframework.dao.DataAccessException customTranslate(String task, String sql, SQLException sqlEx)
customTranslate
in class org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.