com.jn.sqlhelper.jsqlparser.expression.BetweenAndExpressionConverter Maven / Gradle / Ivy
The newest version!
package com.jn.sqlhelper.jsqlparser.expression;
import com.jn.sqlhelper.dialect.expression.BetweenAndExpression;
import net.sf.jsqlparser.expression.operators.relational.Between;
public class BetweenAndExpressionConverter implements ExpressionConverter {
@Override
public Between toJSqlParserExpression(BetweenAndExpression expression) {
Between between = new Between();
between.setLeftExpression(ExpressionConverters.toJSqlParserExpression(expression.getTarget()));
between.setNot(expression.not());
between.setBetweenExpressionStart(ExpressionConverters.toJSqlParserExpression(expression.getLow()));
between.setBetweenExpressionEnd(ExpressionConverters.toJSqlParserExpression(expression.getHigh()));
return between;
}
@Override
public BetweenAndExpression fromJSqlParserExpression(Between expression) {
return null;
}
@Override
public Class getStandardExpressionClass() {
return BetweenAndExpression.class;
}
@Override
public Class getJSqlParserExpressionClass() {
return Between.class;
}
}