public static Primitive Aggregate(List <Primitive> propertyValues, PropertyAggregate aggregationType) { switch (aggregationType) { case PropertyAggregate.COUNT: return(ResolvePrimitive(propertyValues.Count)); case PropertyAggregate.VALUE: return(ValueAggregator(propertyValues)); case PropertyAggregate.SUM: return(SumAggregator(propertyValues)); case PropertyAggregate.AVG: return(AverageAggregator(propertyValues)); case PropertyAggregate.MIN: return(MinAggregator(propertyValues)); case PropertyAggregate.MAX: return(MaxAggregator(propertyValues)); default: throw new Exception("Unknown Aggregation type: " + aggregationType); } }
public AggregatePropertyVariable(PropertyAggregate aggregationType, EntityProvider entityProvider, PropertySupplier property, Direction?direction) { this.aggregationType = aggregationType; this.entityProvider = entityProvider; this.property = property; this.direction = direction; }
public ListAggregateVariable(Variable list, PropertyAggregate agg) { expectedList = list; aggregation = agg; }