Class ExpressionIterator
- java.lang.Object
-
- org.eclipse.persistence.internal.expressions.ExpressionIterator
-
public abstract class ExpressionIterator extends java.lang.ObjectUsed to itterate an expression tree, through inner subclasses.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.ObjectparameterSome iterations require a more general parameter.protected java.lang.ObjectresultAllow the iteration to build a result.protected SQLSelectStatementstatementSome iterations require a statement.
-
Constructor Summary
Constructors Constructor Description ExpressionIterator()Block constructor comment.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetResult()SQLSelectStatementgetStatement()booleanhasAlreadyVisited(Expression expression)Answers if this expression has already been visited.abstract voiditerate(Expression expression)INTERNAL: This method must be defined by subclasses to implement the logic of the iteratation.voiditerateOn(java.util.Vector expressions)INTERNAL:voiditerateOn(Expression expression)INTERNAL: Return the call.voidsetResult(java.lang.Object result)voidsetStatement(SQLSelectStatement statement)booleanshouldIterateOverSubSelects()Normally an Iterator will not go into the where clause of an SQLSubSelectExpression.
-
-
-
Field Detail
-
result
protected java.lang.Object result
Allow the iteration to build a result.
-
statement
protected SQLSelectStatement statement
Some iterations require a statement.
-
parameter
protected java.lang.Object parameter
Some iterations require a more general parameter.
-
-
Method Detail
-
getResult
public java.lang.Object getResult()
-
getStatement
public SQLSelectStatement getStatement()
-
hasAlreadyVisited
public boolean hasAlreadyVisited(Expression expression)
Answers if this expression has already been visited. For a faster iteration override to insure expressions are only visited/processed once.
-
iterate
public abstract void iterate(Expression expression)
INTERNAL: This method must be defined by subclasses to implement the logic of the iteratation.
-
iterateOn
public void iterateOn(java.util.Vector expressions)
INTERNAL:
-
iterateOn
public void iterateOn(Expression expression)
INTERNAL: Return the call.
-
setResult
public void setResult(java.lang.Object result)
-
setStatement
public void setStatement(SQLSelectStatement statement)
-
shouldIterateOverSubSelects
public boolean shouldIterateOverSubSelects()
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.
-
-