org.hibernate.sql.ast.tree.predicate.BetweenPredicate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
Hibernate's core ORM functionality
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.sql.ast.tree.predicate;
import org.hibernate.sql.ast.spi.SqlAstWalker;
import org.hibernate.sql.ast.tree.expression.Expression;
/**
* @author Steve Ebersole
*/
public class BetweenPredicate implements Predicate {
private final Expression expression;
private final Expression lowerBound;
private final Expression upperBound;
private final boolean negated;
public BetweenPredicate(
Expression expression,
Expression lowerBound,
Expression upperBound,
boolean negated) {
this.expression = expression;
this.lowerBound = lowerBound;
this.upperBound = upperBound;
this.negated = negated;
}
public Expression getExpression() {
return expression;
}
public Expression getLowerBound() {
return lowerBound;
}
public Expression getUpperBound() {
return upperBound;
}
public boolean isNegated() {
return negated;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public void accept(SqlAstWalker sqlTreeWalker) {
sqlTreeWalker.visitBetweenPredicate( this );
}
}