FileDocCategorySizeDatePackage
SqrtNode.javaAPI DocGlassfish v2 API3275Tue May 22 16:54:40 BST 2007oracle.toplink.essentials.internal.parsing

SqrtNode

public class SqrtNode extends ArithmeticFunctionNode
INTERNAL

Purpose: Represent a SQRT

Responsibilities:

  • Generate the correct expression for SQRT
author
Jon Driscoll and Joel Lucuik
since
TopLink 4.0

Fields Summary
Constructors Summary
public SqrtNode()
Return a new SqrtNode

        super();
    
Methods Summary
public oracle.toplink.essentials.expressions.ExpressiongenerateExpression(oracle.toplink.essentials.internal.parsing.GenerationContext context)
INTERNAL Generate the TopLink expression for this node

        Expression whereClause = getLeft().generateExpression(context);
        whereClause = whereClause.getFunction(ExpressionOperator.Sqrt);
        return whereClause;
    
public voidvalidate(oracle.toplink.essentials.internal.parsing.ParseTreeContext context)
INTERNAL Validate node and calculate its type.

        TypeHelper typeHelper = context.getTypeHelper();
        if (left != null) {
            left.validate(context);
        }
        setType(typeHelper.getDoubleType());
    
public voidvalidateParameter(oracle.toplink.essentials.internal.parsing.ParseTreeContext context, java.lang.Object contextType)
INTERNAL

        // delegate to the argument node
        left.validateParameter(context, contextType);