Package org.springframework.transaction.interceptor

# Class TransactionAttributeSourceAdvisor

java.lang.Object
org.springframework.aop.support.AbstractPointcutAdvisor
org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor

All Implemented Interfaces:
  `Serializable`, `org.springframework.aop.Advisor`, `org.springframework.aop.PointcutAdvisor`, `org.springframework.core.Ordered`

public class TransactionAttributeSourceAdvisor extends org.springframework.aop.support.AbstractPointcutAdvisor
Advisor driven by a `TransactionAttributeSource`, used to include a `TransactionInterceptor` only for methods that are transactional.

Because the AOP framework caches advice calculations, this is normally faster than just letting the TransactionInterceptor run and find out itself that it has no work to do.

Author:
  Rod Johnson, Juergen Hoeller
See Also:
  - `setTransactionInterceptor(org.springframework.transaction.interceptor.TransactionInterceptor)`
  - `TransactionProxyFactoryBean`
  - Serialized Form

## Field Summary

### Fields inherited from interface org.springframework.aop.Advisor

`EMPTY_ADVICE`

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

## Constructor Summary

Constructors
Constructor
Description
`TransactionAttributeSourceAdvisor()`
Create a new TransactionAttributeSourceAdvisor.
`TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)`
Create a new TransactionAttributeSourceAdvisor.

## Method Summary

Modifier and Type
Method
Description
`org.aopalliance.aop.Advice`
`getAdvice()`
`org.springframework.aop.Pointcut`
`getPointcut()`
`void`
`setClassFilter(org.springframework.aop.ClassFilter classFilter)`
Set the `ClassFilter` to use for this pointcut.
`void`
`setTransactionInterceptor(TransactionInterceptor interceptor)`
Set the transaction interceptor to use for this advisor.

### Methods inherited from class org.springframework.aop.support.AbstractPointcutAdvisor

`equals, getOrder, hashCode, setOrder`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.aop.Advisor

`isPerInstance`

## Constructor Details

### TransactionAttributeSourceAdvisor

public TransactionAttributeSourceAdvisor()
Create a new TransactionAttributeSourceAdvisor.

### TransactionAttributeSourceAdvisor

public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)
Create a new TransactionAttributeSourceAdvisor.

Parameters:
  `interceptor` - the transaction interceptor to use for this advisor

## Method Details

### setTransactionInterceptor

public void setTransactionInterceptor(TransactionInterceptor interceptor)
Set the transaction interceptor to use for this advisor.

### setClassFilter

public void setClassFilter(org.springframework.aop.ClassFilter classFilter)
Set the `ClassFilter` to use for this pointcut. Default is `ClassFilter.TRUE`.

### getAdvice

public org.aopalliance.aop.Advice getAdvice()

### getPointcut

public org.springframework.aop.Pointcut getPointcut()