Skip to main content

Expression builder

The ExpressionBuilder is a utility class to build criteria objects that are used with the CriteriaBuilder.

Methods

MethodDescriptionParamsReturn valueExample
withFieldSets the field in the expression objectstringExpressionBuilder
new ExpressionBuilder().withField('TRADE_ID')
withValueSets the value the expression is tested againstunknown (can be string, boolean or number)ExpressionBuilder
new ExpressionBuilder().withValue('TR_1234') //checking a string
new ExpressionBuilder().withValue(500) //checking a number
new ExpressionBuilder().withValue(boolean) //checking a boolean
withSerialiserSets the serialiser type on the expressionSerialiserExpressionBuilder
new ExpressionBuilder().withSerialiser(Serialiser.EQ) // testing equals
new ExpressionBuilder().withSerialiser(Serialiser.GT) // testing greater than
new ExpressionBuilder().withSerialiser(Serialiser.GE) // testing greater
new ExpressionBuilder().withSerialiser(Serialiser.LT) // testing less than
new ExpressionBuilder().withSerialiser(Serialiser.LE) // testing less
withGroupToDo What does group dostringExpressionBuilder
new ExpressionBuilder().withGroup('group')
BuildCreates an Expression object based on the values sretnoneExpression
new ExpressionBuilder().build();