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

AggregateNode

public abstract class AggregateNode extends Node
INTERNAL

Purpose: Superclass for Aggregate Nodes

Responsibilities:

  • Apply itself to a query correctly
author
Jon Driscoll
since
TopLink 5.0

Fields Summary
private boolean
distinct
Constructors Summary
Methods Summary
protected abstract oracle.toplink.essentials.expressions.ExpressionaddAggregateExression(oracle.toplink.essentials.expressions.Expression expr)
INTERNAL

public oracle.toplink.essentials.expressions.ExpressiongenerateExpression(oracle.toplink.essentials.internal.parsing.GenerationContext context)
INTERNAL Return a TopLink expression generated using the left node

        String name = getAsString();
        Expression aggregateExpr = context.expressionFor(name);
        if (aggregateExpr == null) {
            Expression arg = getLeft().generateExpression(context);
            if (usesDistinct()) {
                arg = arg.distinct();
            }
            aggregateExpr = addAggregateExression(arg);
            context.addExpression(aggregateExpr, name);
        }
        return aggregateExpr;
    
public booleanisAggregateNode()
INTERNAL Is this node an Aggregate node

        return true;
    
public java.lang.StringresolveAttribute()
INTERNAL


          
       
        Node arg = getLeft();
        return arg.isDotNode() ? ((DotNode)arg).resolveAttribute() : null;
    
public java.lang.ClassresolveClass(oracle.toplink.essentials.internal.parsing.GenerationContext context)
resolveClass: Answer the class associated with my left node.

        return getLeft().resolveClass(context);
    
public voidsetDistinct(boolean distinct)

        this.distinct = distinct;
    
public booleanusesDistinct()

        return distinct;