// Is fixed up to be its first child or new expression builder if no children.
// Child value expressions need their backpointer to their local base set,
// this is not persisted so must be hooked back up after loading.
descriptor.getEventManager().addListener(new DescriptorEventAdapter() {
public void postBuild(DescriptorEvent event) {
FunctionExpression expression = (FunctionExpression)event.getObject();
for (int index = 0; index < expression.getChildren().size(); index++) {
Expression child = (Expression)expression.getChildren().get(index);
if (child.isValueExpression()) {
child.setLocalBase(new ExpressionBuilder());
}
}
if (expression.getChildren().size() > 0) {
expression.setBaseExpression((Expression)expression.getChildren().get(0));
}
else {
expression.setBaseExpression(new ExpressionBuilder());
}
}
});
XMLDirectMapping operatorMapping = new XMLDirectMapping();