org.objectweb.medor.filter.lib

Class Count

Implemented Interfaces:
AggregateOperator, UnaryOperator

public class Count
extends BasicAggregateOperator

Count aggregate function.

Count applies to :

  1. a FieldOperand, which is part of a NestedField.
  2. a Collection of values (TupleCollection), specifying which Field is to be aggregated
  3. a Collection of values (Java Collection)

In the case of Count, it may be that no operand is specified. In this case, like in SQL (*), the Tuples made of all Fields of the NestedField are considered.

Author:
Alexandre Lefebvre

Field Summary

Fields inherited from class org.objectweb.medor.filter.lib.BasicAggregateOperator

distinct

Constructor Summary

Count()
Count(Expression e)
Count(Expression e, boolean distinct)

Method Summary

Object
clone(Object clone, Map obj2clone)
Operand
compileExpression()
boolean
countAll()
Operand
evaluate(ParameterOperand[] pos, Object o)
String
getOperatorString()
void
setCountAll()

Methods inherited from class org.objectweb.medor.filter.lib.BasicAggregateOperator

clone, getDistinct, setDistinct

Constructor Details

Count

public Count()


Count

public Count(Expression e)


Count

public Count(Expression e,
             boolean distinct)

Method Details

clone

public Object clone(Object clone,
                    Map obj2clone)
            throws CloneNotSupportedException
Overrides:
clone in interface BasicAggregateOperator


compileExpression

public Operand compileExpression()
            throws ExpressionException,
                   MalformedExpressionException


countAll

public boolean countAll()


evaluate

public Operand evaluate(ParameterOperand[] pos,
                        Object o)
            throws ExpressionException


getOperatorString

public String getOperatorString()


setCountAll

public void setCountAll()