org.teiid.connector.language
Interface IAggregate

All Superinterfaces:
IExpression, ILanguageObject

public interface IAggregate
extends IExpression

Represents an expression in the SELECT clause. Anything other than an aggregate symbol in the SELECT clause will be referenced by an IExpressionSymbol.


Field Summary
static java.lang.String AVG
           
static java.lang.String COUNT
           
static java.lang.String MAX
           
static java.lang.String MIN
           
static java.lang.String SUM
           
 
Method Summary
 IExpression getExpression()
          Get the expression within the aggregate function.
 java.lang.String getName()
          Get the name of the aggregate function.
 boolean isDistinct()
          Determine whether this function was executed with DISTINCT.
 void setDistinct(boolean isDistinct)
          Set whether this function was executed with DISTINCT.
 void setExpression(IExpression expression)
          Set the expression within the aggregate function.
 void setName(java.lang.String name)
          Set the name of the aggregate function.
 
Methods inherited from interface org.teiid.connector.language.IExpression
getType, setType
 
Methods inherited from interface org.teiid.connector.language.ILanguageObject
acceptVisitor
 

Field Detail

COUNT

static final java.lang.String COUNT
See Also:
Constant Field Values

AVG

static final java.lang.String AVG
See Also:
Constant Field Values

SUM

static final java.lang.String SUM
See Also:
Constant Field Values

MIN

static final java.lang.String MIN
See Also:
Constant Field Values

MAX

static final java.lang.String MAX
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Get the name of the aggregate function. This will be one of the constants defined in this interface.

See Also:
COUNT, AVG, SUM, MIN, MAX

setName

void setName(java.lang.String name)
Set the name of the aggregate function. This will be one of the constants defined in this interface.

Parameters:
name - New aggregate function name
See Also:
COUNT, AVG, SUM, MIN, MAX

isDistinct

boolean isDistinct()
Determine whether this function was executed with DISTINCT. Executing with DISTINCT will remove all duplicate values in a group when evaluating the aggregate function.

Returns:
True if DISTINCT mode is used

setDistinct

void setDistinct(boolean isDistinct)
Set whether this function was executed with DISTINCT. Executing with DISTINCT will remove all duplicate values in a group when evaluating the aggregate function.

Parameters:
isDistinct - True if DISTINCT mode should be used

getExpression

IExpression getExpression()
Get the expression within the aggregate function. The expression will be null for the special case COUNT(*). This is the only case where the expression will be null

Returns:
The expression or null for COUNT(*)

setExpression

void setExpression(IExpression expression)
Set the expression within the aggregate function. The expression will be null for the special case COUNT(*).

Parameters:
expression - The new expression


Copyright © 2009. All Rights Reserved.