package org.gluu.persist.couchbase.model;

import com.couchbase.client.java.query.dsl.Expression;

/**
 * Filter to Expression convertation result
 *
 * @author Yuriy Movchan Date: 06/21/2019
 */
public class ConvertedExpression {
	
	private Expression expression;
	private boolean consistency;

	private ConvertedExpression(Expression expression) {
		this.expression = expression;
	}

	private ConvertedExpression(Expression expression, boolean consistency) {
		this.expression = expression;
		this.consistency = consistency;
	}

	public static ConvertedExpression build(Expression expression, boolean consistency) {
		return new ConvertedExpression(expression, consistency);
	}

	public Expression expression() {
		return expression;
	}

	public boolean consistency() {
		return consistency;
	}

	public void consistency(boolean consistency) {
		this.consistency = consistency;
	}

}

@@ -877,10 +877,150 @@
 cy;%0A%09%7D%0A%0A
+%09@Override%0A%09public String toString() %7B%0A%09%09return %22ConvertedExpression %5Bexpression=%22 + expression + %22, consistency=%22 + consistency + %22%5D%22;%0A%09%7D%0A%0A
 %7D%0A

Add to string to show real expression