Package com.onec.ui
Class WidgetAggregate
java.lang.Object
com.onec.ui.WidgetAggregate
Builds the SQL aggregate expression for a count/metric card.
count needs no
column; sum/avg/min/max aggregate a single numeric
column, which must be one of the entity's known columns (so the metric field can
never carry arbitrary SQL). sum coalesces to zero so an empty table reads
as 0 rather than null.-
Method Summary
-
Method Details
-
expression
- Parameters:
metric- one ofcount|sum|avg|min|max(null/blank →count)field- the column to aggregate; required for everything butcountcolumns- the entity's valid column names- Throws:
IllegalArgumentException- if the metric is unknown, or the field is missing/unknown
-