org.datanucleus.query.evaluator.memory
Class SetExpression

java.lang.Object
  extended by org.datanucleus.query.evaluator.memory.SetExpression

public class SetExpression
extends java.lang.Object

Expression for the aggregation of a set of object values. Provides basic aggregation methods "count", "min", "max", "avg", "sum" and makes use of the AggregateExpression sub-types for Java type handling.


Constructor Summary
SetExpression(java.util.Collection items, java.lang.String alias)
          Constructor for a SetExpression to perform the aggregation.
 
Method Summary
 java.lang.Object avg(Expression paramExpr, ExpressionEvaluator eval, java.util.Map<java.lang.String,java.lang.Object> state)
           
 java.lang.Object count(Expression expr, ExpressionEvaluator eval)
           
 java.lang.Object max(Expression paramExpr, ExpressionEvaluator eval, java.util.Map<java.lang.String,java.lang.Object> state)
           
 java.lang.Object min(Expression paramExpr, ExpressionEvaluator eval, java.util.Map<java.lang.String,java.lang.Object> state)
           
 java.lang.Object sum(Expression paramExpr, ExpressionEvaluator eval, java.util.Map<java.lang.String,java.lang.Object> state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetExpression

public SetExpression(java.util.Collection items,
                     java.lang.String alias)
Constructor for a SetExpression to perform the aggregation.

Parameters:
items - The items to aggregate
alias - The alias for these items
Method Detail

count

public java.lang.Object count(Expression expr,
                              ExpressionEvaluator eval)

min

public java.lang.Object min(Expression paramExpr,
                            ExpressionEvaluator eval,
                            java.util.Map<java.lang.String,java.lang.Object> state)

max

public java.lang.Object max(Expression paramExpr,
                            ExpressionEvaluator eval,
                            java.util.Map<java.lang.String,java.lang.Object> state)

sum

public java.lang.Object sum(Expression paramExpr,
                            ExpressionEvaluator eval,
                            java.util.Map<java.lang.String,java.lang.Object> state)

avg

public java.lang.Object avg(Expression paramExpr,
                            ExpressionEvaluator eval,
                            java.util.Map<java.lang.String,java.lang.Object> state)


Copyright © 2010. All Rights Reserved.