类 CustomSQLErrorCodesTranslation
- java.lang.Object
- org.springframework.jdbc.support.CustomSQLErrorCodesTranslation
public class CustomSQLErrorCodesTranslation extends Object
JavaBean for holding custom JDBC error codes translation for a particular database. The "exceptionClass" property defines which exception will be thrown for the list of error codes specified in the errorCodes property.- 从以下版本开始:
- 1.1
- 作者:
- Thomas Risberg
- 另请参阅:
SQLErrorCodeSQLExceptionTranslator
构造器概要
构造器 构造器 说明 CustomSQLErrorCodesTranslation()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String[]
getErrorCodes()
Return the SQL error codes to match.Class<?>
getExceptionClass()
Return the exception class for the specified error codes.void
setErrorCodes(String... errorCodes)
Set the SQL error codes to match.void
setExceptionClass(Class<?> exceptionClass)
Set the exception class for the specified error codes.
构造器详细资料
CustomSQLErrorCodesTranslation
public CustomSQLErrorCodesTranslation()
方法详细资料
setErrorCodes
public void setErrorCodes(String... errorCodes)
Set the SQL error codes to match.
getErrorCodes
public String[] getErrorCodes()
Return the SQL error codes to match.
setExceptionClass
public void setExceptionClass(Class<?> exceptionClass)
Set the exception class for the specified error codes.
getExceptionClass
public Class<?> getExceptionClass()
Return the exception class for the specified error codes.