use of org.apache.cayenne.exp.parser.ASTGreater in project cayenne by apache.
the class SelectQueryReturnTypesIT method testSelectBitwiseNot.
@Test
public void testSelectBitwiseNot() throws Exception {
if (!accessStackAdapter.supportsBitwiseOps()) {
return;
}
createNumericsDataSet();
// to simplify result checking, do double NOT
Expression left = new ASTBitwiseNot(new ASTBitwiseNot(new ASTObjPath(ReturnTypesMap1.INTEGER_COLUMN.getName())));
Expression right = new ASTScalar(2);
Expression greater = new ASTGreater();
greater.setOperand(0, left);
greater.setOperand(1, right);
List<ReturnTypesMap1> objects = ObjectSelect.query(ReturnTypesMap1.class, greater).select(context);
assertEquals(2, objects.size());
}
Aggregations