org.pentaho.reporting.engine.classic.core.function
Class ColumnAggregationExpression

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.function.AbstractExpression
      extended by org.pentaho.reporting.engine.classic.core.function.ColumnAggregationExpression
All Implemented Interfaces:
Serializable, Cloneable, Expression
Direct Known Subclasses:
AndExpression, ColumnAverageExpression, ColumnDifferenceExpression, ColumnDivisionExpression, ColumnMaximumExpression, ColumnMinimumExpression, ColumnMultiplyExpression, ColumnSumExpression, OrExpression, SingleValueQueryFunction

public abstract class ColumnAggregationExpression
extends AbstractExpression

The base-class for all expressions that aggregate values from multiple columns.

Author:
Thomas Morgner
See Also:
Serialized Form

Method Summary
 String[] getField()
          Returns all defined fields as array of strings.
 String getField(int index)
          Returns the defined field at the given index-position.
 int getFieldCount()
          Returns the number of fields defined in this expression.
 Expression getInstance()
          Return a completly separated copy of this function.
 void setField(int index, String field)
          Defines the field in the field-list at the given index.
 void setField(String[] fields)
          Defines all fields as array.
 
Methods inherited from class org.pentaho.reporting.engine.classic.core.function.AbstractExpression
clone, getDataRow, getDependencyLevel, getName, getReportConfiguration, getResourceBundleFactory, getRuntime, isActive, isDeepTraversing, isPreserve, setActive, setDependencyLevel, setName, setPreserve, setRuntime
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
getValue
 

Method Detail

setField

public void setField(int index,
                     String field)
Defines the field in the field-list at the given index.

Parameters:
index - the position in the list, where the field should be defined.
field - the name of the field.

getField

public String getField(int index)
Returns the defined field at the given index-position.

Parameters:
index - the position of the field name that should be queried.
Returns:
the field name at the given position.

getFieldCount

public int getFieldCount()
Returns the number of fields defined in this expression.

Returns:
the number of fields.

getField

public String[] getField()
Returns all defined fields as array of strings.

Returns:
all the fields.

setField

public void setField(String[] fields)
Defines all fields as array. This completely replaces any previously defined fields.

Parameters:
fields - the new list of fields.

getInstance

public Expression getInstance()
Return a completly separated copy of this function. The copy does no longer share any changeable objects with the original function.

Specified by:
getInstance in interface Expression
Overrides:
getInstance in class AbstractExpression
Returns:
a copy of this function.