Class ExpressionBuilder
java.lang.Object
com.e1c.langtool.history.db.query.ExpressionBuilder
Builder to construct immutable expressions based on operations.
This builder creates expressions with operations in the reversed order and considers boolean operators as unary.
For example this query expression:
ExpressionBuilder.where(Criteries.valueEqual("val"))
.and(Criteries.langEqual("en"))
.andNot(Criteries.projectEqual("proj")).build();
will be represented as the following tree:
AND
/\
/ \
AND NOT
/\ \
/ \ project='proj'
/ \
value EQUAL 'val' language = 'en'
-
Method Summary
Modifier and TypeMethodDescriptionand(IExpression expression) static IExpressionand(IExpression exp1, IExpression exp2) andNot(IExpression expression) build()or(IExpression expression) orNot(IExpression expression) static ExpressionBuilderwhere(IExpression expression)
-
Method Details
-
and
-
where
-
and
-
or
-
andNot
-
orNot
-
build
-