Top Description Fields Constructors Methods
org.apache.derby.impl.sql.compile

pack-priv Class HasCorrelatedCRsVisitor

extends Object
implements Visitor
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.compile.Visitor
Imports
org.apache.derby.iapi.sql.compile.Visitable, .Visitor

Find out if we have an correlated column reference anywhere below us. Stop traversal as soon as we find one.

Field Summary

Modifier and TypeField and Description
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv
HasCorrelatedCRsVisitor()

Construct a visitor

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean

Returns:

true/false
hasCorrelatedCRs
()

Indicate whether we found the node in question

pack-priv void
setHasCorrelatedCRs(boolean
true/false
value
)

Shortcut to set if hasCorrelatedCRs

public boolean
skipChildren(Visitable
the node to process
v
)

Implements org.apache.derby.iapi.sql.compile.Visitor.skipChildren.

Method that is called to indicate whether we should skip all nodes below this node for traversal.

public boolean

Returns:

true/false
stopTraversal
()

Implements org.apache.derby.iapi.sql.compile.Visitor.stopTraversal.

Stop traversal if we found the target node

public Visitable

Returns:

me
visit
(Visitable
the node to process
node
)

Implements org.apache.derby.iapi.sql.compile.Visitor.visit.

If we have found the target node, we are done.

public boolean
visitChildrenFirst(Visitable
the top node of a sub-tree about to be visited
v
)

Implements org.apache.derby.iapi.sql.compile.Visitor.visitChildrenFirst.

Method that is called to see if visit() should be called on the children of node before it is called on node itself.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hasCorrelatedCRsback to summary
private boolean hasCorrelatedCRs

Constructor Detail

HasCorrelatedCRsVisitorback to summary
pack-priv HasCorrelatedCRsVisitor()

Construct a visitor

Method Detail

hasCorrelatedCRsback to summary
pack-priv boolean hasCorrelatedCRs()

Indicate whether we found the node in question

Returns:boolean

true/false

setHasCorrelatedCRsback to summary
pack-priv void setHasCorrelatedCRs(boolean value)

Shortcut to set if hasCorrelatedCRs

Parameters
value:boolean

true/false

skipChildrenback to summary
public boolean skipChildren(Visitable v)

Implements org.apache.derby.iapi.sql.compile.Visitor.skipChildren.

Doc from org.apache.derby.iapi.sql.compile.Visitor.skipChildren.

Method that is called to indicate whether we should skip all nodes below this node for traversal. Useful if we want to effectively ignore/prune all branches under a particular node.

Differs from stopTraversal() in that it only affects subtrees, rather than the entire traversal.

Parameters
v:Visitable

the node to process

Returns:boolean

true/false

stopTraversalback to summary
public boolean stopTraversal()

Implements org.apache.derby.iapi.sql.compile.Visitor.stopTraversal.

Stop traversal if we found the target node

Returns:boolean

true/false

visitback to summary
public Visitable visit(Visitable node)

Implements org.apache.derby.iapi.sql.compile.Visitor.visit.

If we have found the target node, we are done.

Parameters
node:Visitable

the node to process

Returns:Visitable

me

visitChildrenFirstback to summary
public boolean visitChildrenFirst(Visitable v)

Implements org.apache.derby.iapi.sql.compile.Visitor.visitChildrenFirst.

Doc from org.apache.derby.iapi.sql.compile.Visitor.visitChildrenFirst.

Method that is called to see if visit() should be called on the children of node before it is called on node itself. If this method always returns true, the visitor will walk the tree bottom-up. If it always returns false, the tree is visited top-down.

Parameters
v:Visitable

the top node of a sub-tree about to be visited

Returns:boolean

true if node's children should be visited before node, false otherwise