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

CustomSQLExceptionTranslatorRegistry

open class CustomSQLExceptionTranslatorRegistry

Registry for custom org.springframework.jdbc.support.SQLExceptionTranslator instances associated with specific databases allowing for overriding translation based on values contained in the configuration file named "sql-error-codes.xml".

Author
Thomas Risberg

Since
3.1.1

See Also
SQLErrorCodesFactory

Functions

findTranslatorForDatabase

open fun findTranslatorForDatabase(dbName: String): SQLExceptionTranslator

Find a custom translator for the specified database.

getInstance

open static fun getInstance(): CustomSQLExceptionTranslatorRegistry

Return the singleton instance.

registerTranslator

open fun registerTranslator(dbName: String, translator: SQLExceptionTranslator): Unit

Register a new custom translator for the specified database name.