*/
void init()
throws QueryParseException
{
if (_where instanceof AndExpr) {
AndExpr and = (AndExpr) _where;
ArrayList<AmberExpr> components = and.getComponents();
for (int i = components.size() - 1; i >= 0; i--) {
AmberExpr component = components.get(i);
if (component instanceof JoinExpr) {
JoinExpr link = (JoinExpr) component;
if (link.bindToFromItem()) {
components.remove(i);
}
}
}
_where = and.getSingle();
}
if (_having instanceof AndExpr) {
AndExpr and = (AndExpr) _having;
ArrayList<AmberExpr> components = and.getComponents();
for (int i = components.size() - 1; i >= 0; i--) {
AmberExpr component = components.get(i);
if (component instanceof JoinExpr) {
JoinExpr link = (JoinExpr) component;
if (link.bindToFromItem()) {
components.remove(i);
}
}
}
_having = and.getSingle();
}
// Rolls up unused from items from the left to the right.
// It's not necessary to roll up the rightmost items because
// they're only created if they're actually needed