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

NullComparisonNode

public class NullComparisonNode extends SimpleConditionalExpressionNode
INTERNAL

Purpose: This node represents the IS NULL comparisons

Responsibilities:

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

Fields Summary
Constructors Summary
public NullComparisonNode()
Return a new NullComparisonNode.

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

        Expression whereClause = getLeft().generateExpression(context);
        whereClause = whereClause.isNull();
        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);
            left.validateParameter(context, typeHelper.getObjectType());
        }
        setType(typeHelper.getBooleanType());