FileDocCategorySizeDatePackage
GenerationContext.javaAPI DocGlassfish v2 API6141Tue May 22 16:54:38 BST 2007oracle.toplink.essentials.internal.parsing

GenerationContext

public class GenerationContext extends Object
INTERNAL

Purpose: Maintain the generation context for an EJBQL query

Responsibilities:

  • Maintain a table of expression builders and alias's
  • Maintain the base query class
  • Maintain a handle to the session
  • Maintain a handle to the parse tree
author
Jon Driscoll and Joel Lucuik
since
TopLink 4.0

Fields Summary
protected AbstractSession
session
protected ParseTreeContext
parseTreeContext
protected Class
baseQueryClass
protected Expression
baseExpression
protected Hashtable
expressions
protected ParseTree
parseTree
protected boolean
isNotIndicatedInMemberOf
protected MemberOfNode
memberOfNode
Constructors Summary
public GenerationContext()


      
        super();
        expressions = new Hashtable();
    
public GenerationContext(ParseTreeContext newContext, AbstractSession newSession, ParseTree newParseTree)

        super();
        parseTreeContext = newContext;
        session = newSession;
        expressions = new Hashtable();
        parseTree = newParseTree;
    
Methods Summary
public voidaddExpression(oracle.toplink.essentials.expressions.Expression expression, java.lang.String aliasName)

        expressions.put(aliasName, expression);
    
public oracle.toplink.essentials.expressions.ExpressionexpressionFor(java.lang.String aliasName)

        return (Expression)expressions.get(aliasName);
    
public oracle.toplink.essentials.expressions.ExpressiongetBaseExpression()

        return baseExpression;
    
public java.lang.ClassgetBaseQueryClass()

        return baseQueryClass;
    
public oracle.toplink.essentials.internal.parsing.MemberOfNodegetMemberOfNode()

        return memberOfNode;
    
public oracle.toplink.essentials.internal.parsing.ParseTreegetParseTree()

        return parseTree;
    
public oracle.toplink.essentials.internal.parsing.ParseTreeContextgetParseTreeContext()

        return parseTreeContext;
    
public oracle.toplink.essentials.internal.sessions.AbstractSessiongetSession()

        return session;
    
public booleanhasMemberOfNode()

        return memberOfNode != null;
    
public oracle.toplink.essentials.expressions.ExpressionjoinVariables(java.util.Set variables)

        return null;
    
public voidsetBaseExpression(java.lang.String variable, oracle.toplink.essentials.expressions.Expression expr)
Caches the specified expression under the variable name for the base query class.

        // Store the expression for faster access
        baseExpression = expr;
        
        // Store it into the cache
        addExpression(expr, variable);
    
public voidsetBaseQueryClass(java.lang.Class newBaseQueryClass)

        baseQueryClass = newBaseQueryClass;
    
public voidsetMemberOfNode(oracle.toplink.essentials.internal.parsing.MemberOfNode newMemberOfNode)

        memberOfNode = newMemberOfNode;
    
public voidsetParseTree(oracle.toplink.essentials.internal.parsing.ParseTree parseTree)

        this.parseTree = parseTree;
    
public voidsetParseTreeContext(oracle.toplink.essentials.internal.parsing.ParseTreeContext newParseTreeContext)

        parseTreeContext = newParseTreeContext;
    
public voidsetSession(oracle.toplink.essentials.internal.sessions.AbstractSession newSession)

        session = newSession;
    
public booleanshouldCheckSelectNodeBeforeResolving()

        return false;
    
public booleanshouldUseOuterJoins()

        return false;
    
public booleanuseParallelExpressions()

        return false;