Package org.springframework.jdbc.support

# Class CustomSQLExceptionTranslatorRegistrar

java.lang.Object
org.springframework.jdbc.support.CustomSQLExceptionTranslatorRegistrar

All Implemented Interfaces:
  `org.springframework.beans.factory.InitializingBean`

public class CustomSQLExceptionTranslatorRegistrar extends Object implements org.springframework.beans.factory.InitializingBean
Registry for custom `SQLExceptionTranslator` instances for specific databases.

Since:
  3.1.1
Author:
  Thomas Risberg

## Constructor Summary

Constructors
Constructor
Description
`CustomSQLExceptionTranslatorRegistrar()`

## Method Summary

Modifier and Type
Method
Description
`void`
`afterPropertiesSet()`
`void`
`setTranslators(Map<String,SQLExceptionTranslator> translators)`
Setter for a Map of `SQLExceptionTranslator` references where the key must be the database name as defined in the `sql-error-codes.xml` file.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CustomSQLExceptionTranslatorRegistrar

public CustomSQLExceptionTranslatorRegistrar()

## Method Details

### setTranslators

public void setTranslators(Map<String,SQLExceptionTranslator> translators)
Setter for a Map of `SQLExceptionTranslator` references where the key must be the database name as defined in the `sql-error-codes.xml` file.

Note that any existing translators will remain unless there is a match in the database name, at which point the new translator will replace the existing one.

### afterPropertiesSet

public void afterPropertiesSet()

Specified by:
  `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`