Class ColumnAggregationExpression
- java.lang.Object
-
- org.pentaho.reporting.engine.classic.core.function.AbstractExpression
-
- 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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ColumnAggregationExpression()
Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.protected Object[]
getFieldValues()
Collects the values of all fields defined in the fieldList.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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pentaho.reporting.engine.classic.core.function.Expression
getValue
-
-
-
-
Method Detail
-
getFieldValues
protected Object[] getFieldValues()
Collects the values of all fields defined in the fieldList.- Returns:
- an Object-array containing all defined values from the datarow
-
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 interfaceExpression
- Overrides:
getInstance
in classAbstractExpression
- Returns:
- a copy of this function.
-
-