All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.onetwo.common.db.parser.SqlInfixConditionExpr Maven / Gradle / Ivy

The newest version!
package org.onetwo.common.db.parser;

import org.onetwo.common.lexer.AbstractParser.JTokenValueCollection;
import org.onetwo.common.utils.LangUtils;


public class SqlInfixConditionExpr extends SqlObjectImpl {

	private JTokenValueCollection left;
	private SqlTokenKey operator;
	private JTokenValueCollection right;
	
	public SqlInfixConditionExpr(){
		super("");
	}

	public SqlInfixConditionExpr(JTokenValueCollection left, SqlTokenKey operator, JTokenValueCollection right) {
		super("");
		this.operator = operator;
		this.left = left;
		this.right = right;
	}
	public JTokenValueCollection getRight() {
		return right;
	}

	public void setRight(JTokenValueCollection right) {
		this.right = right;
	}

	public JTokenValueCollection getLeft() {
		return left;
	}

	public void setLeft(JTokenValueCollection left) {
		this.left = left;
	}

	public SqlTokenKey getOperator() {
		return operator;
	}
	public String getOperatorString() {
		return operator.getName();
	}

	@Override
	public String toFragmentSql() {
		return LangUtils.append(SqlParserUtils.toFragmentSql(getLeft()), operator.getName(), " ", SqlParserUtils.toFragmentSql(getRight()));
	}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy