vishnu.planner
Class CannonicalPlanner

java.lang.Object
  extended by vishnu.planner.CannonicalPlanner
All Implemented Interfaces:
Planner

public final class CannonicalPlanner
extends java.lang.Object
implements Planner

Esta clase implementa un planificador canonico de instrucciones SQL.

Author:
Mariano Tepper y Hernan Rancati TODO usar la fabrica de algoritmos.
 

Nested Class Summary
static class CannonicalPlanner.Context
           
 
Method Summary
protected  java.util.Collection asCollection(int index)
           
protected  java.util.List<java.lang.String> asList(java.lang.String name)
           
protected  java.lang.String columnRename(java.lang.String columnName)
           
 java.lang.String getExecutionPlan()
          retorna el plan de ejecucion para el ultimo comando asignado.
static CannonicalPlanner getInstance()
           
 Relation getRelation()
          retorna la expresion en algebra relacional planificada.
protected  Relation getRelationForTable(java.lang.String tableName)
           
protected  java.lang.String selectedColumnName(SelectStatement s)
           
static void setContext(CannonicalPlanner.Context c)
           
 void setStatement(SQLStatement s)
          asigna el comando a planificar.
protected  SQLOperand translateExpression(SQLOperand o, java.util.List<SelectStatement> i)
          transforma los operadores IN en igualdades
protected  Relation translateRelation(SelectStatement s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setContext

public static void setContext(CannonicalPlanner.Context c)

getInstance

public static CannonicalPlanner getInstance()
                                     throws vishnu.planner.CannonicalPlanner.ContextRequiredException
Throws:
vishnu.planner.CannonicalPlanner.ContextRequiredException

setStatement

public void setStatement(SQLStatement s)
Description copied from interface: Planner
asigna el comando a planificar.

Specified by:
setStatement in interface Planner

asCollection

protected java.util.Collection asCollection(int index)

asList

protected java.util.List<java.lang.String> asList(java.lang.String name)

translateRelation

protected Relation translateRelation(SelectStatement s)

columnRename

protected java.lang.String columnRename(java.lang.String columnName)

selectedColumnName

protected java.lang.String selectedColumnName(SelectStatement s)

translateExpression

protected SQLOperand translateExpression(SQLOperand o,
                                         java.util.List<SelectStatement> i)
transforma los operadores IN en igualdades


getRelationForTable

protected Relation getRelationForTable(java.lang.String tableName)

getExecutionPlan

public java.lang.String getExecutionPlan()
Description copied from interface: Planner
retorna el plan de ejecucion para el ultimo comando asignado.

Specified by:
getExecutionPlan in interface Planner

getRelation

public Relation getRelation()
Description copied from interface: Planner
retorna la expresion en algebra relacional planificada.

Specified by:
getRelation in interface Planner