use of org.eclipse.persistence.jpa.jpql.parser.NullIfExpression in project eclipselink by eclipse-ee4j.
the class ReportItemBuilder method visit.
@Override
public void visit(NullIfExpression expression) {
Expression queryExpression = queryContext.buildExpression(expression, type);
addAttribute(NullIfExpression.NULLIF, queryExpression);
}
use of org.eclipse.persistence.jpa.jpql.parser.NullIfExpression in project eclipselink by eclipse-ee4j.
the class ExpressionBuilderVisitor method visit.
@Override
public void visit(NullIfExpression expression) {
// Create the first expression
expression.getFirstExpression().accept(this);
Expression firstExpression = queryExpression;
Class<?> actualType = type[0];
// Create the second expression
expression.getSecondExpression().accept(this);
Expression secondExpression = queryExpression;
// Now create the NULLIF expression
queryExpression = firstExpression.nullIf(secondExpression);
// Set the expression type
type[0] = actualType;
}
Aggregations