Query query = new Query();
Select select = new Select();
select.addSymbol(new AllSymbol());
query.setSelect(select);
From from = new From();
from.addGroup(new GroupSymbol("a.thing")); //$NON-NLS-1$
query.setFrom(from);
Function func1 = new Function("concat", new Expression[] { new Constant("a"), new Constant("b")}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
Function func2 = new Function("concat", new Expression[] { func1, new Constant("c")}); //$NON-NLS-1$ //$NON-NLS-2$
CompareCriteria crit = new CompareCriteria(new ElementSymbol("e1"), CompareCriteria.EQ, func2); //$NON-NLS-1$
query.setCriteria(crit);