|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.dao.support.PersistenceExceptionTranslationInterceptor
public class PersistenceExceptionTranslationInterceptor
AOP Alliance MethodInterceptor that provides persistence exception translation based on a given PersistenceExceptionTranslator.
Delegates to the given PersistenceExceptionTranslator to translate any RuntimeException thrown into Spring's DataAccessException hierarchy (if appropriate). If the RuntimeException in question is declared on the target method, it is always propagated as-is (with no translation applied).
PersistenceExceptionTranslator
Constructor Summary | |
---|---|
PersistenceExceptionTranslationInterceptor()
Create a new PersistenceExceptionTranslationInterceptor. |
|
PersistenceExceptionTranslationInterceptor(PersistenceExceptionTranslator persistenceExceptionTranslator)
Create a new PersistenceExceptionTranslationInterceptor for the given PersistenceExceptionTranslator. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
Object |
invoke(MethodInvocation mi)
|
void |
setPersistenceExceptionTranslator(PersistenceExceptionTranslator persistenceExceptionTranslator)
Specify the PersistenceExceptionTranslator to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PersistenceExceptionTranslationInterceptor()
setPersistenceExceptionTranslator(org.springframework.dao.support.PersistenceExceptionTranslator)
public PersistenceExceptionTranslationInterceptor(PersistenceExceptionTranslator persistenceExceptionTranslator)
persistenceExceptionTranslator
- the PersistenceExceptionTranslator to useMethod Detail |
---|
public final void setPersistenceExceptionTranslator(PersistenceExceptionTranslator persistenceExceptionTranslator)
public void afterPropertiesSet()
InitializingBean
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.
afterPropertiesSet
in interface InitializingBean
public Object invoke(MethodInvocation mi) throws Throwable
invoke
in interface MethodInterceptor
Throwable
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |