spring-framework / org.springframework.jdbc.support / CustomSQLErrorCodesTranslation

CustomSQLErrorCodesTranslation

open class CustomSQLErrorCodesTranslation

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.

Author
Thomas Risberg

Since
1.1

See Also
SQLErrorCodeSQLExceptionTranslator

Constructors

<init>

CustomSQLErrorCodesTranslation()

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.

Functions

getErrorCodes

open fun getErrorCodes(): Array<String>

Return the SQL error codes to match.

getExceptionClass

open fun getExceptionClass(): Class<*>

Return the exception class for the specified error codes.

setErrorCodes

open fun setErrorCodes(vararg errorCodes: String): Unit

Set the SQL error codes to match.

setExceptionClass

open fun setExceptionClass(exceptionClass: Class<*>): Unit

Set the exception class for the specified error codes.