FileDocCategorySizeDatePackage
ExpressionIterator.javaAPI DocGlassfish v2 API4112Tue May 22 16:54:32 BST 2007oracle.toplink.essentials.internal.expressions

ExpressionIterator

public abstract class ExpressionIterator extends Object
Used to itterate an expression tree, through inner subclasses.

Fields Summary
protected Object
result
Allow the iteration to build a result.
protected SQLSelectStatement
statement
Some iterations require a statement.
protected Object
parameter
Some iterations require a more general parameter.
Constructors Summary
public ExpressionIterator()
Block constructor comment.

        super();
    
Methods Summary
public java.lang.ObjectgetResult()

        return result;
    
public oracle.toplink.essentials.internal.expressions.SQLSelectStatementgetStatement()

        return statement;
    
public booleanhasAlreadyVisited(oracle.toplink.essentials.expressions.Expression expression)
Answers if this expression has already been visited. For a faster iteration override to insure expressions are only visited/processed once.

        return false;
    
public abstract voiditerate(oracle.toplink.essentials.expressions.Expression expression)
INTERNAL: This method must be defined by subclasses to implement the logic of the iteratation.

public voiditerateOn(java.util.Vector expressions)
INTERNAL:

        for (Enumeration expressionEnum = expressions.elements(); expressionEnum.hasMoreElements();) {
            iterate((Expression)expressionEnum.nextElement());
        }
    
public voiditerateOn(oracle.toplink.essentials.expressions.Expression expression)
INTERNAL: Return the call.

        expression.iterateOn(this);
    
public voidsetResult(java.lang.Object result)

        this.result = result;
    
public voidsetStatement(oracle.toplink.essentials.internal.expressions.SQLSelectStatement statement)

        this.statement = statement;
    
public booleanshouldIterateOverSubSelects()
Normally an Iterator will not go into the where clause of an SQLSubSelectExpression. I.e. when aliasing the parent statement is aliased before the subselects may even be normalized. An iterator to alias the SubSelect must be run later.

        return false;