Class PersistenceExceptionTranslationAdvisor

java.lang.Object
org.springframework.aop.support.AbstractPointcutAdvisor
org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor
All Implemented Interfaces:
Serializable, Advisor, PointcutAdvisor, Ordered

public class PersistenceExceptionTranslationAdvisor extends AbstractPointcutAdvisor
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:
  • Constructor Details

    • PersistenceExceptionTranslationAdvisor

      public 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