public class CustomSQLExceptionTranslatorRegistry extends Object
SQLExceptionTranslator
instances associated with
specific databases allowing for overriding translation based on values contained in the configuration file
named "sql-error-codes.xml".SQLErrorCodesFactory
Modifier and Type | Method and Description |
---|---|
SQLExceptionTranslator |
findTranslatorForDatabase(String dbName)
Find a custom translator for the specified database.
|
static CustomSQLExceptionTranslatorRegistry |
getInstance()
Return the singleton instance.
|
void |
registerTranslator(String dbName,
SQLExceptionTranslator translator)
Register a new custom translator for the specified database name.
|
public static CustomSQLExceptionTranslatorRegistry getInstance()
public void registerTranslator(String dbName, SQLExceptionTranslator translator)
dbName
- the database nametranslator
- the custom translator@Nullable public SQLExceptionTranslator findTranslatorForDatabase(String dbName)
dbName
- the database namenull
if none found