org.n3r.eql.trans.spring.EqlTransactionAdvisor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eql Show documentation
Show all versions of eql Show documentation
a simple wrapper framework for jdbc to seperate sql and java code
package org.n3r.eql.trans.spring;
import org.aopalliance.aop.Advice;
import org.n3r.eql.trans.spring.annotation.EqlTransactional;
import org.springframework.aop.Pointcut;
import org.springframework.aop.support.AbstractPointcutAdvisor;
import org.springframework.aop.support.StaticMethodMatcherPointcut;
import org.springframework.beans.factory.annotation.Autowired;
import java.lang.reflect.Method;
public class EqlTransactionAdvisor extends AbstractPointcutAdvisor {
final StaticMethodMatcherPointcut pointcut = new StaticMethodMatcherPointcut() {
@Override
public boolean matches(Method method, Class> targetClass) {
return method.isAnnotationPresent(EqlTransactional.class);
}
};
@Autowired EqlTransactionInterceptor interceptor;
@Override
public Pointcut getPointcut() {
return this.pointcut;
}
@Override
public Advice getAdvice() {
return this.interceptor;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy