FileDocCategorySizeDatePackage
AbsNode.javaAPI DocGlassfish v2 API3165Tue May 22 16:54:36 BST 2007oracle.toplink.essentials.internal.parsing

AbsNode

public class AbsNode extends ArithmeticFunctionNode
INTERNAL

Purpose: Represent an ABS in EJBQL

Responsibilities:

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

Fields Summary
Constructors Summary
public AbsNode()

        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 = ExpressionMath.abs(whereClause);
        return whereClause;
    
public voidvalidate(oracle.toplink.essentials.internal.parsing.ParseTreeContext context)
INTERNAL Validate node and calculate its type.

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

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