/**
  * Creates a new expression that joins this object with another expression, using specified join
  * type. It is very useful for incrementally building chained expressions, like long AND or OR
  * statements.
  */
 public Expression joinExp(int type, Expression exp) {
   Expression join = ExpressionFactory.expressionOfType(type);
   join.setOperand(0, this);
   join.setOperand(1, exp);
   join.flattenTree();
   return join;
 }