Spring Framework

org.springframework.jdbc.support
Class CustomSQLExceptionTranslatorRegistrar

java.lang.Object
  extended by org.springframework.jdbc.support.CustomSQLExceptionTranslatorRegistrar
All Implemented Interfaces:
InitializingBean

public class CustomSQLExceptionTranslatorRegistrar
extends java.lang.Object
implements InitializingBean

Registry for registering custom SQLExceptionTranslator instances for specific databases.

Since:
3.1.1
Author:
Thomas Risberg

Constructor Summary
CustomSQLExceptionTranslatorRegistrar()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
 void setTranslators(java.util.Map<java.lang.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 Detail

CustomSQLExceptionTranslatorRegistrar

public CustomSQLExceptionTranslatorRegistrar()
Method Detail

setTranslators

public void setTranslators(java.util.Map<java.lang.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()
Description copied from interface: InitializingBean
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Specified by:
afterPropertiesSet in interface InitializingBean

Spring Framework