Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.data.engine.api.aggregation
Interface IAggrFunction

    public interface IAggrFunction

Each instance of IAggrFunction defines an aggregation function which can be used in BIRT. All user defined aggregations should implement this interface.

Field Summary
`static int` | `RUNNING_AGGR`
`static int` | `SUMMARY_AGGR`

Method Summary
`int` | `getDataType()` get the aggregation data type.
`java.lang.Object` | `getDefaultValue()` Returns the default aggregation result if the data series that the accumulator of this aggregation function requires is empty.
`java.lang.String` | `getDescription()` Gets the functional description of this aggregation function.
`java.lang.String` | `getDisplayName()` Gets the display name that identifies the aggregation function in the report designer user interface.
`java.lang.String` | `getName()` Gets the name that identifies the aggregate function represented by this class.
`int` | `getNumberOfPasses()` Returns the number of passes over the data series that the accumulator of this aggregate requires.
`IParameterDefn[]` | `getParameterDefn()` Gets information about the parameters that this aggregate function takes as an array of IParameterDefn values.
`int` | `getType()` Gets the type of the Aggregation.
`boolean` | `isDataOrderSensitive()` To indicate whether the data series is order sensitive for the aggregation value.
`Accumulator` | `newAccumulator()` Creates a new instance of the accumulator for this aggregation.

Field Detail

### SUMMARY_AGGR

    static final int SUMMARY_AGGR

See Also:
  Constant Field Values

### RUNNING_AGGR

    static final int RUNNING_AGGR

See Also:
  Constant Field Values

Method Detail

### getName

    java.lang.String getName()

  Gets the name that identifies the aggregate function represented by this class. For BIRT built-in aggregations, this is the name of the JavaScript function (e.g., "SUM", "AVG", etc).

### getDisplayName

    java.lang.String getDisplayName()

  Gets the display name that identifies the aggregation function in the report designer user interface.

  Returns:

### getDescription

    java.lang.String getDescription()

  Gets the functional description of this aggregation function.

  Returns:

### getType

    int getType()

  Gets the type of the Aggregation. The aggregation can be SUMMARY_AGGR, meaning that only one value is calculated for the whole series of data rows (e.g., the Total.SUM function). Or it can be RUNNING_AGGR, meaning that a value is calculated for each row in the series (e.g., the movingAve function).

  Returns:
    Type of the aggregation. Value can be SUMMARY_AGGR or RUNNING_AGGR

### getDataType

    int getDataType()

  get the aggregation data type.

  Returns:

### getParameterDefn

    IParameterDefn[] getParameterDefn()

  Gets information about the parameters that this aggregate function takes as an array of IParameterDefn values.

  The length of the returned array is the number of runtime parameters that this aggregate function takes. Note that this number excludes the optional filter and group parameters common to all aggregate functions. Those two parameters are handled by the DtE.

  If the n'th element in the array is true, it means that the n'th parameter is a dynamic parameter which needs to be evaluated at each row. Otherwise the parameter is static, and it only needs to be evaluated once at the start of the accumulation

  For example, the Total.movingAve function is defined as
  movingAve( expr, window [, filter [, group ]] )
  The expr parameter is the data being aggregated over and should be calculated at every row. The window parameter on the other hand must be a fixed number for each series of data. Therefore the class implementing the movingAve function should return boolean array [true, false].

### getNumberOfPasses

    int getNumberOfPasses()

  Returns the number of passes over the data series that the accumulator of this aggregate requires. For SUMMARY aggregates, the accumulator returns a value after all passes are complete. For RUNNING aggregates, the accumulator returns data in the last pass.

  Returns:

### getDefaultValue

    java.lang.Object getDefaultValue()

  Returns the default aggregation result if the data series that the accumulator of this aggregation function requires is empty.

  Returns:

### isDataOrderSensitive

    boolean isDataOrderSensitive()

  To indicate whether the data series is order sensitive for the aggregation value.

  Returns:

### newAccumulator

    Accumulator newAccumulator()

  Creates a new instance of the accumulator for this aggregation.

  Returns:
    A new instance of the accumulator

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.