Class PersistenceExceptionTranslationAdvisor
java.lang.Object
org.springframework.aop.support.AbstractPointcutAdvisor
org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor
- All Implemented Interfaces:
- Serializable,- Advisor,- PointcutAdvisor,- Ordered
Spring AOP exception translation aspect for use at Repository or DAO layer level.
 Translates native persistence exceptions into Spring's DataAccessException hierarchy,
 based on a given PersistenceExceptionTranslator.
- Since:
- 2.0
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from interface org.springframework.aop.AdvisorEMPTY_ADVICEFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionPersistenceExceptionTranslationAdvisor(PersistenceExceptionTranslator persistenceExceptionTranslator, Class<? extends Annotation> repositoryAnnotationType) Create a new PersistenceExceptionTranslationAdvisor.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the advice part of this aspect.Get the Pointcut that drives this advisor.Methods inherited from class org.springframework.aop.support.AbstractPointcutAdvisorequals, getOrder, hashCode, setOrderMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.aop.AdvisorisPerInstance
- 
Constructor Details- 
PersistenceExceptionTranslationAdvisorpublic PersistenceExceptionTranslationAdvisor(PersistenceExceptionTranslator persistenceExceptionTranslator, Class<? extends Annotation> repositoryAnnotationType) Create a new PersistenceExceptionTranslationAdvisor.- Parameters:
- persistenceExceptionTranslator- the PersistenceExceptionTranslator to use
- repositoryAnnotationType- the annotation type to check for
 
 
- 
- 
Method Details- 
getAdviceDescription copied from interface:AdvisorReturn the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc.- Returns:
- the advice that should apply if the pointcut matches
- See Also:
 
- 
getPointcutDescription copied from interface:PointcutAdvisorGet the Pointcut that drives this advisor.
 
-