org.objectweb.medor.query.jorm.lib
Class JormQueryTreeHelper

java.lang.Object
  extended byorg.objectweb.medor.query.jorm.lib.JormQueryTreeHelper

public class JormQueryTreeHelper
extends java.lang.Object

This helper class provides methods to helper the Jorm/Medor users.

Author:
S.Chassande-Barrioz

Constructor Summary
JormQueryTreeHelper()
           
 
Method Summary
static void addPrefetchFields(ClassExtent ext, QueryTree qt)
           
static void addPrefetchFields(ClassExtent ext, QueryTree oldroot, QueryNode newroot)
           
static java.util.Collection getJormExtents(QueryTree qt)
          Retrieves a Collection of JormExtent instance which are used in a given query tree.
static java.util.Collection getRequiredPNameManagers(QueryTree qt)
          Retrieves a Collection of ParameterOperand reuiqring in a given query tree which the type is NAMING_CONTEXT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JormQueryTreeHelper

public JormQueryTreeHelper()
Method Detail

getJormExtents

public static java.util.Collection getJormExtents(QueryTree qt)
Retrieves a Collection of JormExtent instance which are used in a given query tree. This permits to known all JormExtent used in a queries and to assign some parameters in order to replace a JormExtent by a specific query leaf during the optimization step. A JormExtent can be a ClassExtent or a GenClassExtent.

Parameters:
qt - is the querytree instance containing (or not) JormExtent nodes
Returns:
a collection of JormExtent instances

getRequiredPNameManagers

public static java.util.Collection getRequiredPNameManagers(QueryTree qt)
Retrieves a Collection of ParameterOperand reuiqring in a given query tree which the type is NAMING_CONTEXT. It permits to know all parameters needed at evaluation time for the navigation over classes persitent with Jorm.

Parameters:
qt - is the query tree requiring PNamingContext parameters
Returns:
a collection of ParameterOperand instance

addPrefetchFields

public static void addPrefetchFields(ClassExtent ext,
                                     QueryTree oldroot,
                                     QueryNode newroot)
                              throws MedorException
Throws:
MedorException

addPrefetchFields

public static void addPrefetchFields(ClassExtent ext,
                                     QueryTree qt)
                              throws MedorException
Throws:
MedorException