com.talanlabs.mybatis.rsql.engine.where.comparisons.factory.AbstractRsqlResultFactory Maven / Gradle / Ivy
The newest version!
package com.talanlabs.mybatis.rsql.engine.where.comparisons.factory;
import com.talanlabs.component.factory.ComponentDescriptor;
import java.lang.annotation.Annotation;
public abstract class AbstractRsqlResultFactory implements IRsqlResultFactory {
private final Class annotationClass;
public AbstractRsqlResultFactory(Class annotationClass) {
super();
this.annotationClass = annotationClass;
}
@Override
public boolean acceptProperty(ComponentDescriptor componentDescriptor, ComponentDescriptor.PropertyDescriptor propertyDescriptor) {
return propertyDescriptor.getMethod().isAnnotationPresent(annotationClass);
}
public final Class getAnnotationClass() {
return annotationClass;
}
}