org.eigenbase.lurql
Class LurqlPlanVertex

java.lang.Object
  extended by org.eigenbase.lurql.LurqlPlanVertex

public class LurqlPlanVertex
extends Object

LurqlPlanVertex is a vertex in a LURQL plan graph.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/lurql/LurqlPlanVertex.java#1 $
Author:
John V. Sichi

Field Summary
private  Set<JmiClassVertex> classVertexSet
          Set of JmiClassVertex references corresponding to classes which need to be queried at this point in the plan.
private  List<LurqlFilter> filters
          All filters that apply at the given node
private  String name
          Name for this vertex (unique with respect to containing plan).
private  LurqlPlan plan
          Containing plan.
private  LurqlPlanVertex recursionRoot
          If non-null, the root of a recursive cycle.
private  org.jgrapht.DirectedGraph<LurqlPlanVertex,LurqlPlanEdge> recursionSubgraph
          If non-null, a subgraph of vertices which should be executed cyclically to implement dynamic recursion.
private  boolean recursive
          True if this vertex participates in a recursion execution cycle.
private  Set<String> rootObjectIds
          Set of object MofIds to use as roots.
private  String stringRep
          String representation of this vertex.
private  Set<JmiClassVertex> unmodifiableClassVertexSet
          Unmodifiable counterpart to classVertexSet (for public consumption).
private  List<LurqlFilter> unmodifiableFilters
          Unmodifiable counterpart to filters (for public consumption).
private  String var
          The alias assigned to this vertex in the parsed query, or null if none.
 
Constructor Summary
LurqlPlanVertex(LurqlPlan plan, String name, String alias, Set<String> rootObjectIds)
           
 
Method Summary
(package private)  void addClassVertex(JmiClassVertex classVertex)
           
(package private)  void addFilters(List<LurqlFilter> filters)
           
private  String computeStringRep()
           
(package private)  org.jgrapht.DirectedGraph<LurqlPlanVertex,LurqlPlanEdge> createReachableSubgraph(boolean setRecursive)
           
(package private)  void freeze()
           
 String getAlias()
           
 Set<JmiClassVertex> getClassVertexSet()
           
 List<LurqlFilter> getFilters()
           
 String getName()
           
 LurqlPlanVertex getRecursionRoot()
           
 org.jgrapht.DirectedGraph<LurqlPlanVertex,LurqlPlanEdge> getRecursionSubgraph()
           
 Set<String> getRootObjectIds()
           
 boolean isRecursive()
           
(package private)  void setRecursionRoot(LurqlPlanVertex recursionRoot)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

plan

private final LurqlPlan plan
Containing plan.


name

private final String name
Name for this vertex (unique with respect to containing plan).


var

private final String var
The alias assigned to this vertex in the parsed query, or null if none.


classVertexSet

private Set<JmiClassVertex> classVertexSet
Set of JmiClassVertex references corresponding to classes which need to be queried at this point in the plan.


unmodifiableClassVertexSet

private Set<JmiClassVertex> unmodifiableClassVertexSet
Unmodifiable counterpart to classVertexSet (for public consumption).


filters

private final List<LurqlFilter> filters
All filters that apply at the given node


unmodifiableFilters

private final List<LurqlFilter> unmodifiableFilters
Unmodifiable counterpart to filters (for public consumption).


rootObjectIds

private final Set<String> rootObjectIds
Set of object MofIds to use as roots.


recursionRoot

private LurqlPlanVertex recursionRoot
If non-null, the root of a recursive cycle. We avoid creating an explicit graph edge to represent the cycle; instead, we use this "weak edge" and keep the graph structure acyclic.


recursionSubgraph

private org.jgrapht.DirectedGraph<LurqlPlanVertex,LurqlPlanEdge> recursionSubgraph
If non-null, a subgraph of vertices which should be executed cyclically to implement dynamic recursion.


recursive

private boolean recursive
True if this vertex participates in a recursion execution cycle.


stringRep

private String stringRep
String representation of this vertex.

Constructor Detail

LurqlPlanVertex

public LurqlPlanVertex(LurqlPlan plan,
                       String name,
                       String alias,
                       Set<String> rootObjectIds)
Method Detail

getName

public String getName()

getAlias

public String getAlias()

getRecursionSubgraph

public org.jgrapht.DirectedGraph<LurqlPlanVertex,LurqlPlanEdge> getRecursionSubgraph()

isRecursive

public boolean isRecursive()

getRecursionRoot

public LurqlPlanVertex getRecursionRoot()

setRecursionRoot

void setRecursionRoot(LurqlPlanVertex recursionRoot)

createReachableSubgraph

org.jgrapht.DirectedGraph<LurqlPlanVertex,LurqlPlanEdge> createReachableSubgraph(boolean setRecursive)

toString

public String toString()
Overrides:
toString in class Object

computeStringRep

private String computeStringRep()

getFilters

public List<LurqlFilter> getFilters()

getClassVertexSet

public Set<JmiClassVertex> getClassVertexSet()

getRootObjectIds

public Set<String> getRootObjectIds()

addClassVertex

void addClassVertex(JmiClassVertex classVertex)

addFilters

void addFilters(List<LurqlFilter> filters)

freeze

void freeze()