类 PersistenceExceptionTranslationAdvisor
- java.lang.Object
- org.springframework.aop.support.AbstractPointcutAdvisor
- org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor
- 所有已实现的接口:
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.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Juergen Hoeller
- 另请参阅:
DataAccessException,PersistenceExceptionTranslator, 序列化表格
字段概要
从接口继承的字段 org.springframework.aop.Advisor
EMPTY_ADVICE
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 PersistenceExceptionTranslationAdvisor(PersistenceExceptionTranslator persistenceExceptionTranslator, Class<? extends Annotation> repositoryAnnotationType)Create a new PersistenceExceptionTranslationAdvisor.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 AdvicegetAdvice()Return the advice part of this aspect.PointcutgetPointcut()Get the Pointcut that drives this advisor.从类继承的方法 org.springframework.aop.support.AbstractPointcutAdvisor
equals, getOrder, hashCode, isPerInstance, setOrder
构造器详细资料
PersistenceExceptionTranslationAdvisor
public PersistenceExceptionTranslationAdvisor(PersistenceExceptionTranslator persistenceExceptionTranslator, Class<? extends Annotation> repositoryAnnotationType)
Create a new PersistenceExceptionTranslationAdvisor.- 参数:
persistenceExceptionTranslator- the PersistenceExceptionTranslator to userepositoryAnnotationType- the annotation type to check for
方法详细资料
getAdvice
public Advice getAdvice()
从接口复制的说明:AdvisorReturn the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc.- 返回:
- the advice that should apply if the pointcut matches
- 另请参阅:
MethodInterceptor,BeforeAdvice,ThrowsAdvice,AfterReturningAdvice
getPointcut
public Pointcut getPointcut()
从接口复制的说明:PointcutAdvisorGet the Pointcut that drives this advisor.