org.axiondb.functions
Class CountFunction

java.lang.Object
  extended by org.axiondb.BaseSelectable
      extended by org.axiondb.functions.BaseFunction
          extended by org.axiondb.functions.CountFunction
All Implemented Interfaces:
Serializable, Function, FunctionFactory, AggregateFunction, ConcreteFunction, Selectable

public class CountFunction
extends BaseFunction
implements AggregateFunction, FunctionFactory

COUNT: an aggregate function returning the number of rows.

Version:
$Revision: 1.6 $ $Date: 2004/04/15 02:52:23 $
See Also:
Serialized Form

Constructor Summary
CountFunction()
           
 
Method Summary
 Object evaluate(RowDecorator row)
           
 Object evaluate(RowDecoratorIterator rows)
           
 DataType getDataType()
           
 boolean isValid()
           
 ConcreteFunction makeNewInstance()
           
 
Methods inherited from class org.axiondb.functions.BaseFunction
addArgument, getAlias, getArgument, getArgumentCount, getLabel, getName, setAlias, setArgument, setName, setVariableContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.axiondb.Function
addArgument, getAlias, getArgument, getArgumentCount, getName, setAlias, setArgument
 
Methods inherited from interface org.axiondb.Selectable
getLabel, setVariableContext
 

Constructor Detail

CountFunction

public CountFunction()
Method Detail

makeNewInstance

public ConcreteFunction makeNewInstance()
Specified by:
makeNewInstance in interface FunctionFactory

getDataType

public DataType getDataType()
Specified by:
getDataType in interface Selectable
Specified by:
getDataType in class BaseFunction

evaluate

public Object evaluate(RowDecorator row)
                throws AxionException
Specified by:
evaluate in interface Selectable
Throws:
AxionException

evaluate

public Object evaluate(RowDecoratorIterator rows)
                throws AxionException
Specified by:
evaluate in interface AggregateFunction
Throws:
AxionException

isValid

public boolean isValid()
Specified by:
isValid in interface ConcreteFunction
Specified by:
isValid in class BaseFunction