com.wesleyhome.dao.processor.method.BetweenQueryMethodGenerator Maven / Gradle / Ivy
package com.wesleyhome.dao.processor.method;
import org.apache.commons.lang3.StringUtils;
import com.sun.codemodel.JClass;
import com.sun.codemodel.JMethod;
import com.sun.codemodel.JMod;
public class BetweenQueryMethodGenerator extends BaseQueryParameterMethodGenerator{
@Override
protected String getQueryTypeName() {
return "IsBetween";
}
@Override
protected String getPredicateMethodName() {
return "between";
}
@Override
protected void addMethodParameters(final JMethod method, final JClass fieldType, final String parameterName) {
method.param(JMod.FINAL, fieldType, String.format("start%s", StringUtils.capitalize(parameterName)));
method.param(JMod.FINAL, fieldType, String.format("end%s", StringUtils.capitalize(parameterName)));
}
}