Adobe LiveCycle Business Activity Monitoring ES API

com.celequest.api.function
Interface IUDAggregateFunction

All Superinterfaces:
IUDFunction

public interface IUDAggregateFunction
extends IUDFunction

Interface for user-defined aggregate functions.

Since:
2.5.3

Method Summary
 void delete(IUDAggregateState aggregateState, ISQLValue[] values)
          Deletes a set of values (that were previously inserted) from the aggregate state.
 void getResult(IUDAggregateState aggregateState, ISQLValue result)
          This method is used to retrieve the computed aggregate value for the specified aggregate state.
 void insert(IUDAggregateState aggregateState, ISQLValue[] values)
          Inserts a set of values into the aggregate state.
 void mergeDelete(IUDAggregateState aggregateState1, IUDAggregateState aggregateState2)
          Deletes aggregateState2 (which aggregates a subset of values) from aggregateState1.
 void mergeInsert(IUDAggregateState aggregateState1, IUDAggregateState aggregateState2)
          Inserts aggregateState2 into aggregateState1 For example, for the AVG set function, this method may add the two partial sums and the two partial counts.
 IUDAggregateState open()
          Initialization function called once for each group, producing an aggregate state object for the group.
 
Methods inherited from interface com.celequest.api.function.IUDFunction
setLogger
 

Method Detail

open

public IUDAggregateState open()
Initialization function called once for each group, producing an aggregate state object for the group. This aggregate state will hold the aggregate info for the consumed rows of a group.

Returns:
An initialized aggregate state object.

mergeInsert

public void mergeInsert(IUDAggregateState aggregateState1,
                        IUDAggregateState aggregateState2)
Inserts aggregateState2 into aggregateState1 For example, for the AVG set function, this method may add the two partial sums and the two partial counts.

NOTE: aggregateState2 should not be mutated by this call.

Parameters:
aggregateState1 - first of two aggregate states to be merged
aggregateState2 - second of two aggregate states to be merged

mergeDelete

public void mergeDelete(IUDAggregateState aggregateState1,
                        IUDAggregateState aggregateState2)
Deletes aggregateState2 (which aggregates a subset of values) from aggregateState1. For example, for the AVG set function, this method may take the difference of the two partial sums and the two partial counts.

NOTE: aggregateState2 should not be mutated by this call.

Parameters:
aggregateState1 - first of two aggregate states to be merged
aggregateState2 - second of two aggregate states to be merged

insert

public void insert(IUDAggregateState aggregateState,
                   ISQLValue[] values)
Inserts a set of values into the aggregate state.

Parameters:
aggregateState - aggregate state
values - values to be inserted

delete

public void delete(IUDAggregateState aggregateState,
                   ISQLValue[] values)
Deletes a set of values (that were previously inserted) from the aggregate state.

Parameters:
aggregateState - aggregate state
values - set of values to be deleted

getResult

public void getResult(IUDAggregateState aggregateState,
                      ISQLValue result)
This method is used to retrieve the computed aggregate value for the specified aggregate state.

The SQL Standard states that NULL inputs should not be included in aggregate results. User-defined functions that ignore this rule should document this behaviour carefully.

The SQL Standard states that an aggregate over no input values (that is, aggregateState.getcount() == 0) should return NULL. Usef-defined functins should adhere to this rule.

Parameters:
aggregateState - the aggregate state
result - the value to store the result in

Adobe LiveCycle Business Activity Monitoring ES API

Copyright © 2004-2007 Adobe Systems Incorporated. All rights reserved.
Copyright © 2002-2007 Celequest Corp. All Rights Reserved.

Take a survey