-
14 Jan 2009 8:57 PM #1
SummaryType.render should return an Object
SummaryType.render should return an Object
The SummaryType method:
should return an Object.Code:public abstract double render(Object v, ModelData m, String field, Map<String, Object> data)
This allows for non-double based summaries like BigDecimal, max and min String or Date etc.
Also the implementations of SUM, AVG and COUNT should check for null values when going:
I would suggest use the same rules as SQL for nulls in SUM, AVG and COUNT.Code:((Number) m.get(field)).doubleValue()


Reply With Quote