Package org.apache.openjpa.kernel.exps
Interface AggregateListener
-
- All Superinterfaces:
Serializable
public interface AggregateListener extends Serializable
An aggregate listener aggregates data produced by an ExpressionQuery.- Author:
- Abe White, Patrick Linskey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectevaluate(Collection args, Class[] argClasses, Collection candidates, StoreContext ctx)Return the value of this aggregate.booleanexpectsArguments()Return whether this function expects to act on arguments.StringgetTag()Return the tag that this listener listens for.ClassgetType(Class[] argClasses)Return the expected type of the result of this listener.
-
-
-
Method Detail
-
getTag
String getTag()
Return the tag that this listener listens for.
-
expectsArguments
boolean expectsArguments()
Return whether this function expects to act on arguments. Some function may not need arguments; for example, a function to count the number of objects that match a given filter might be of the form:count().
-
evaluate
Object evaluate(Collection args, Class[] argClasses, Collection candidates, StoreContext ctx)
Return the value of this aggregate.- Parameters:
args- for each candidate, the value of the arguments to the function; will be null if this aggregate does not expect an argument; if this function has multiple arguments, each element will be an arrayargClasses- the expected class of each argument elementcandidates- the candidate objects being evaluatedctx- the persistence context- Returns:
- the value of the aggregate
- Throws:
UserException- if this aggregate does not support in-memory operation
-
-