org.objectweb.medor.filter.lib
Class Count

java.lang.Object
  extended byBasicUnaryOperator
      extended byorg.objectweb.medor.filter.lib.BasicAggregateOperator
          extended byorg.objectweb.medor.filter.lib.Count
All Implemented Interfaces:
AggregateOperator

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
See Also:
Serialized Form

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
 java.lang.Object clone(java.lang.Object clone, java.util.Map obj2clone)
           
 Operand compileExpression()
           
 boolean countAll()
           
 Operand evaluate(ParameterOperand[] pos, java.lang.Object o)
           
 java.lang.String getOperatorString()
           
 void setCountAll()
           
 
Methods inherited from class org.objectweb.medor.filter.lib.BasicAggregateOperator
getDistinct, setDistinct
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Count

public Count()

Count

public Count(Expression e)

Count

public Count(Expression e,
             boolean distinct)
Method Detail

clone

public java.lang.Object clone(java.lang.Object clone,
                              java.util.Map obj2clone)
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class BasicAggregateOperator
Throws:
java.lang.CloneNotSupportedException

getOperatorString

public java.lang.String getOperatorString()

compileExpression

public Operand compileExpression()
                          throws ExpressionException,
                                 MalformedExpressionException
Throws:
ExpressionException
MalformedExpressionException

evaluate

public Operand evaluate(ParameterOperand[] pos,
                        java.lang.Object o)
                 throws ExpressionException
Throws:
ExpressionException

countAll

public boolean countAll()

setCountAll

public void setCountAll()