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

ParameterNode

public class ParameterNode extends Node
INTERNAL

Purpose: This node represnts a Parameter (?1) in an EJBQL

Responsibilities:

  • Generate the correct expression for an AND in EJBQL
  • Maintain a
author
Jon Driscoll and Joel Lucuik
since
TopLink 4.0

Fields Summary
private String
name
Constructors Summary
public ParameterNode()
Return a new ParameterNode.

        super();
    
public ParameterNode(String newParameterName)
INTERNAL Create a new ParameterNode with the passed string.

param
newVariableName java.lang.String

        setParameterName(newParameterName);
    
Methods Summary
public oracle.toplink.essentials.expressions.ExpressiongenerateExpression(oracle.toplink.essentials.internal.parsing.GenerationContext context)

        //create builder, and add
        Class baseClass = context.getBaseQueryClass();
        ExpressionBuilder builder = new ExpressionBuilder(baseClass);
        Expression whereClause = builder.getParameter(getParameterName(), getType());
        return whereClause;
    
public java.lang.StringgetAsString()
INTERNAL Return the parameterName

        return getParameterName();
    
public java.lang.StringgetParameterName()
INTERNAL Return the parameter name

        return name;
    
public booleanisParameterNode()
INTERNAL Yes this is a Parameter node

        return true;
    
public voidsetParameterName(java.lang.String name)

        this.name = name;
    
public voidvalidateParameter(oracle.toplink.essentials.internal.parsing.ParseTreeContext context, java.lang.Object contextType)
INTERNAL

        context.defineParameterType(name, contextType, getLine(), getColumn());
        setType(context.getParameterType(name));