planetj.database.report
Class ColumnFunction

java.lang.Object
  extended byplanetj.database.report.ColumnFunction
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
ColumnAverage, ColumnCount, ColumnMax, ColumnMin, ColumnSum

public abstract class ColumnFunction
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Represents a function that operates on a column of values in a table

See Also:
Serialized Form

Constructor Summary
protected ColumnFunction()
          ColumnFunction constructor comment.
protected ColumnFunction(java.lang.String pFunctionToken)
          ColumnFunction constructor
protected ColumnFunction(java.lang.String pFunctionToken, java.lang.String pFieldName)
          ColumnFunction constructor
 
Method Summary
abstract  void clear()
          Clears all the previously processed values from the column function
 java.lang.Object clone()
          Clones this ColumnFunction
 ColumnFunction cloneColumnFunction()
          Clones this ColumnFunction
static ColumnFunction getColumnFunction(java.lang.String pToken, java.lang.String pFieldName)
          Gets a ColumnFunction object for the specified token and field name.
 java.lang.String getFieldName()
          Gets the field name identifying the column this ColumnFunction is operating on
 java.lang.String getFunctionToken()
          Gets the function token for this ColumnFunction.
protected  int getPrecision()
          Gets the number of digits after the decimal
abstract  java.lang.Object getValue()
          Gets the current value of the column function
 void processRow(Row pRow)
          Inputs a new row to the column function
abstract  void processValue(java.lang.Object pValue)
          Inputs a new value to the column function
abstract  void set(ColumnFunction cf)
          Sets the internal state of this ColumnFunction to be the same as the state of another ColumnFunction.
protected  void setFieldName(java.lang.String newFieldName)
          Gets the field name identifying the column this ColumnFunction is operating on
protected  void setFunctionToken(java.lang.String newFunctionToken)
          Sets the function token for this ColumnFunction.
protected  void setPrecision(int newPrecision)
          Sets the number of digits after the decimal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnFunction

protected ColumnFunction()
ColumnFunction constructor comment.


ColumnFunction

protected ColumnFunction(java.lang.String pFunctionToken)
ColumnFunction constructor


ColumnFunction

protected ColumnFunction(java.lang.String pFunctionToken,
                         java.lang.String pFieldName)
ColumnFunction constructor

Parameters:
pFunctionToken - The token indicating which function this class should use. The token should be a constant defined in the ColumnFunctionToken class.
pFieldName - The field name identifying the column this ColumnFunction is operating on
Method Detail

clear

public abstract void clear()
Clears all the previously processed values from the column function


clone

public java.lang.Object clone()
Clones this ColumnFunction


cloneColumnFunction

public ColumnFunction cloneColumnFunction()
Clones this ColumnFunction


getColumnFunction

public static ColumnFunction getColumnFunction(java.lang.String pToken,
                                               java.lang.String pFieldName)
                                        throws DataEngineException
Gets a ColumnFunction object for the specified token and field name.

Parameters:
pToken - A token defined in the ColumnFunctionToken class
pFieldName - A field name identifying the column on which the ColumnFunction object will operate
Throws:
DataEngineException

getFieldName

public java.lang.String getFieldName()
Gets the field name identifying the column this ColumnFunction is operating on


getFunctionToken

public java.lang.String getFunctionToken()
Gets the function token for this ColumnFunction. The token should be a constant defined in the ColumnFunctionToken class.


getPrecision

protected int getPrecision()
Gets the number of digits after the decimal


getValue

public abstract java.lang.Object getValue()
Gets the current value of the column function


processRow

public void processRow(Row pRow)
                throws DataEngineException
Inputs a new row to the column function

Throws:
DataEngineException

processValue

public abstract void processValue(java.lang.Object pValue)
                           throws DataEngineException
Inputs a new value to the column function

Throws:
DataEngineException

set

public abstract void set(ColumnFunction cf)
Sets the internal state of this ColumnFunction to be the same as the state of another ColumnFunction. Only this ColumnFunction is altered, the ColumnFunction passed in as an argument is not changed.

Parameters:
cf - A ColumnFunction, which must be compatible with this column function and which will be used to set the internal state of this ColumnFunction

setFieldName

protected void setFieldName(java.lang.String newFieldName)
Gets the field name identifying the column this ColumnFunction is operating on


setFunctionToken

protected void setFunctionToken(java.lang.String newFunctionToken)
Sets the function token for this ColumnFunction. The token should be a constant defined in the ColumnFunctionToken class.


setPrecision

protected void setPrecision(int newPrecision)
Sets the number of digits after the decimal