Search in sources :

Example 1 with AndExpression

use of org.eclipse.persistence.jpa.jpql.parser.AndExpression in project eclipselink by eclipse-ee4j.

the class ExpressionBuilderVisitor method visit.

@Override
public void visit(AndExpression expression) {
    // Create the left side of the logical expression
    expression.getLeftExpression().accept(this);
    Expression leftExpression = queryExpression;
    // Create the right side of the logical expression
    expression.getRightExpression().accept(this);
    Expression rightExpression = queryExpression;
    // Now create the AND expression
    queryExpression = leftExpression.and(rightExpression);
    // Set the expression type
    type[0] = Boolean.class;
}
Also used : TrimExpression(org.eclipse.persistence.jpa.jpql.parser.TrimExpression) AbsExpression(org.eclipse.persistence.jpa.jpql.parser.AbsExpression) CoalesceExpression(org.eclipse.persistence.jpa.jpql.parser.CoalesceExpression) ConcatExpression(org.eclipse.persistence.jpa.jpql.parser.ConcatExpression) SubstringExpression(org.eclipse.persistence.jpa.jpql.parser.SubstringExpression) SizeExpression(org.eclipse.persistence.jpa.jpql.parser.SizeExpression) CastExpression(org.eclipse.persistence.jpa.jpql.parser.CastExpression) SubExpression(org.eclipse.persistence.jpa.jpql.parser.SubExpression) AndExpression(org.eclipse.persistence.jpa.jpql.parser.AndExpression) JPQLExpression(org.eclipse.persistence.jpa.jpql.parser.JPQLExpression) ExtractExpression(org.eclipse.persistence.jpa.jpql.parser.ExtractExpression) MapEntryExpression(org.eclipse.persistence.internal.expressions.MapEntryExpression) IndexExpression(org.eclipse.persistence.jpa.jpql.parser.IndexExpression) StateFieldPathExpression(org.eclipse.persistence.jpa.jpql.parser.StateFieldPathExpression) UpperExpression(org.eclipse.persistence.jpa.jpql.parser.UpperExpression) ExistsExpression(org.eclipse.persistence.jpa.jpql.parser.ExistsExpression) KeyExpression(org.eclipse.persistence.jpa.jpql.parser.KeyExpression) AllOrAnyExpression(org.eclipse.persistence.jpa.jpql.parser.AllOrAnyExpression) ModExpression(org.eclipse.persistence.jpa.jpql.parser.ModExpression) Expression(org.eclipse.persistence.expressions.Expression) LikeExpression(org.eclipse.persistence.jpa.jpql.parser.LikeExpression) CaseExpression(org.eclipse.persistence.jpa.jpql.parser.CaseExpression) LengthExpression(org.eclipse.persistence.jpa.jpql.parser.LengthExpression) MultiplicationExpression(org.eclipse.persistence.jpa.jpql.parser.MultiplicationExpression) UnknownExpression(org.eclipse.persistence.jpa.jpql.parser.UnknownExpression) NullComparisonExpression(org.eclipse.persistence.jpa.jpql.parser.NullComparisonExpression) ValueExpression(org.eclipse.persistence.jpa.jpql.parser.ValueExpression) ComparisonExpression(org.eclipse.persistence.jpa.jpql.parser.ComparisonExpression) InExpression(org.eclipse.persistence.jpa.jpql.parser.InExpression) NotExpression(org.eclipse.persistence.jpa.jpql.parser.NotExpression) DateConstantExpression(org.eclipse.persistence.internal.expressions.DateConstantExpression) BadExpression(org.eclipse.persistence.jpa.jpql.parser.BadExpression) BetweenExpression(org.eclipse.persistence.jpa.jpql.parser.BetweenExpression) SqrtExpression(org.eclipse.persistence.jpa.jpql.parser.SqrtExpression) FunctionExpression(org.eclipse.persistence.jpa.jpql.parser.FunctionExpression) ConstantExpression(org.eclipse.persistence.internal.expressions.ConstantExpression) TableExpression(org.eclipse.persistence.jpa.jpql.parser.TableExpression) CollectionMemberExpression(org.eclipse.persistence.jpa.jpql.parser.CollectionMemberExpression) AbstractPathExpression(org.eclipse.persistence.jpa.jpql.parser.AbstractPathExpression) NullExpression(org.eclipse.persistence.jpa.jpql.parser.NullExpression) ConstructorExpression(org.eclipse.persistence.jpa.jpql.parser.ConstructorExpression) NullIfExpression(org.eclipse.persistence.jpa.jpql.parser.NullIfExpression) CollectionValuedPathExpression(org.eclipse.persistence.jpa.jpql.parser.CollectionValuedPathExpression) LocateExpression(org.eclipse.persistence.jpa.jpql.parser.LocateExpression) AdditionExpression(org.eclipse.persistence.jpa.jpql.parser.AdditionExpression) ObjectExpression(org.eclipse.persistence.jpa.jpql.parser.ObjectExpression) CollectionExpression(org.eclipse.persistence.jpa.jpql.parser.CollectionExpression) RegexpExpression(org.eclipse.persistence.jpa.jpql.parser.RegexpExpression) ParameterExpression(org.eclipse.persistence.internal.expressions.ParameterExpression) LowerExpression(org.eclipse.persistence.jpa.jpql.parser.LowerExpression) OrExpression(org.eclipse.persistence.jpa.jpql.parser.OrExpression) TreatExpression(org.eclipse.persistence.jpa.jpql.parser.TreatExpression) TypeExpression(org.eclipse.persistence.jpa.jpql.parser.TypeExpression) EmptyCollectionComparisonExpression(org.eclipse.persistence.jpa.jpql.parser.EmptyCollectionComparisonExpression) SubtractionExpression(org.eclipse.persistence.jpa.jpql.parser.SubtractionExpression) EntryExpression(org.eclipse.persistence.jpa.jpql.parser.EntryExpression) DivisionExpression(org.eclipse.persistence.jpa.jpql.parser.DivisionExpression) KeywordExpression(org.eclipse.persistence.jpa.jpql.parser.KeywordExpression)

Aggregations

Expression (org.eclipse.persistence.expressions.Expression)1 ConstantExpression (org.eclipse.persistence.internal.expressions.ConstantExpression)1 DateConstantExpression (org.eclipse.persistence.internal.expressions.DateConstantExpression)1 MapEntryExpression (org.eclipse.persistence.internal.expressions.MapEntryExpression)1 ParameterExpression (org.eclipse.persistence.internal.expressions.ParameterExpression)1 AbsExpression (org.eclipse.persistence.jpa.jpql.parser.AbsExpression)1 AbstractPathExpression (org.eclipse.persistence.jpa.jpql.parser.AbstractPathExpression)1 AdditionExpression (org.eclipse.persistence.jpa.jpql.parser.AdditionExpression)1 AllOrAnyExpression (org.eclipse.persistence.jpa.jpql.parser.AllOrAnyExpression)1 AndExpression (org.eclipse.persistence.jpa.jpql.parser.AndExpression)1 BadExpression (org.eclipse.persistence.jpa.jpql.parser.BadExpression)1 BetweenExpression (org.eclipse.persistence.jpa.jpql.parser.BetweenExpression)1 CaseExpression (org.eclipse.persistence.jpa.jpql.parser.CaseExpression)1 CastExpression (org.eclipse.persistence.jpa.jpql.parser.CastExpression)1 CoalesceExpression (org.eclipse.persistence.jpa.jpql.parser.CoalesceExpression)1 CollectionExpression (org.eclipse.persistence.jpa.jpql.parser.CollectionExpression)1 CollectionMemberExpression (org.eclipse.persistence.jpa.jpql.parser.CollectionMemberExpression)1 CollectionValuedPathExpression (org.eclipse.persistence.jpa.jpql.parser.CollectionValuedPathExpression)1 ComparisonExpression (org.eclipse.persistence.jpa.jpql.parser.ComparisonExpression)1 ConcatExpression (org.eclipse.persistence.jpa.jpql.parser.ConcatExpression)1