org.objectweb.medor.query.jorm.lib

Class JormQueryTreeHelper


public class JormQueryTreeHelper
extends java.lang.Object

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

Author:
S.Chassande-Barrioz

Method Summary

static void
addPrefetchFields(ClassExtent ext, QueryTree qt)
static void
addPrefetchFields(ClassExtent ext, QueryTree oldroot, QueryNode newroot)
static Collection
getJormExtents(QueryTree qt)
Retrieves a Collection of JormExtent instance which are used in a given query tree.
static Collection
getRequiredPNameManagers(QueryTree qt)
Retrieves a Collection of ParameterOperand reuiqring in a given query tree which the type is NAMING_CONTEXT.

Method Details

addPrefetchFields

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


addPrefetchFields

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


getJormExtents

public static 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 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