public abstract class AbstractCrudRepositoryInterceptor extends Object implements org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.BeanFactoryAware
EnableAcrossJpaRepositories.EnableAcrossJpaRepositories,
TransactionWrapper| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCrudRepositoryInterceptor(Collection<EntityInterceptor> interceptors) |
| Modifier and Type | Method and Description |
|---|---|
void |
callAfterCreate(Collection<EntityInterceptor> interceptors,
Object entity) |
void |
callAfterDelete(Collection<EntityInterceptor> interceptors,
Object entity) |
void |
callAfterDeleteAll(Collection<EntityInterceptor> interceptors,
Class entityClass) |
void |
callAfterUpdate(Collection<EntityInterceptor> interceptors,
Object entity) |
void |
callBeforeCreate(Collection<EntityInterceptor> interceptors,
Object entity) |
void |
callBeforeDelete(Collection<EntityInterceptor> interceptors,
Object entity) |
void |
callBeforeDeleteAll(Collection<EntityInterceptor> interceptors,
Class entityClass) |
void |
callBeforeUpdate(Collection<EntityInterceptor> interceptors,
Object entity) |
protected TransactionWrapper.InvocationCallback<Object> |
determineCallbackMethod(org.aopalliance.intercept.MethodInvocation invocation) |
protected Collection<EntityInterceptor> |
findInterceptorsToApply(Class<?> entityClass,
Collection<EntityInterceptor> interceptors) |
protected Class<?> |
getEntityClass(org.aopalliance.intercept.MethodInvocation invocation) |
Collection<EntityInterceptor> |
getInterceptors() |
Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setTransactionManagerName(String transactionManagerName)
Set the name of the
PlatformTransactionManager that should be used
for the transaction wrapping the intercept methods. |
protected AbstractCrudRepositoryInterceptor(Collection<EntityInterceptor> interceptors)
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionpublic void setTransactionManagerName(String transactionManagerName)
PlatformTransactionManager that should be used
for the transaction wrapping the intercept methods.transactionManagerName - name of the transaction manager beanpublic Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
invoke in interface org.aopalliance.intercept.MethodInterceptorThrowableprotected TransactionWrapper.InvocationCallback<Object> determineCallbackMethod(org.aopalliance.intercept.MethodInvocation invocation)
protected Class<?> getEntityClass(org.aopalliance.intercept.MethodInvocation invocation)
protected Collection<EntityInterceptor> findInterceptorsToApply(Class<?> entityClass, Collection<EntityInterceptor> interceptors)
public void callBeforeCreate(Collection<EntityInterceptor> interceptors, Object entity)
public void callAfterCreate(Collection<EntityInterceptor> interceptors, Object entity)
public void callBeforeUpdate(Collection<EntityInterceptor> interceptors, Object entity)
public void callAfterUpdate(Collection<EntityInterceptor> interceptors, Object entity)
public void callBeforeDelete(Collection<EntityInterceptor> interceptors, Object entity)
public void callAfterDelete(Collection<EntityInterceptor> interceptors, Object entity)
public void callBeforeDeleteAll(Collection<EntityInterceptor> interceptors, Class entityClass)
public void callAfterDeleteAll(Collection<EntityInterceptor> interceptors, Class entityClass)
public Collection<EntityInterceptor> getInterceptors()
Copyright © 2020. All rights reserved.