Paged Aggregator
Entry point for the aggregation DSL on a PagedListBase.
Each builder method registers one aggregate and returns a SingleAggregator — a view that can either be executed immediately for a single scalar value (.execute<BigDecimal>()) or chained into additional aggregations to produce a MultiAggregator (whose execute() returns a Map keyed by alias).
Aggregations inherit the parent list's constraints and per-column filters — list.getColumn(0).filter = "Acme" is honored by sum/avg/… — but the isDistinct flag is ignored for aggregates.
val list = PagedList<Company>()
stormify.attach(list)
list.addColumn("industry").filter = "Tech"
// Single value
val total: BigDecimal? = list.getAggregator()
.sum(Company_.revenue)
.execute<BigDecimal>()
// Multiple values
val row: Map<String, Any?> = list.getAggregator()
.sum(Company_.revenue, "total")
.avg(Company_.revenue, "average")
.count("*", "cnt")
.execute()Functions
Starts an AVG(path) aggregation.
Starts an AVG(path) aggregation using a type-safe ScalarPath.
Starts a COUNT(path) aggregation. Pass "*" for COUNT(*).
Starts a COUNT(path) aggregation using a type-safe ScalarPath.
Starts a COUNT(DISTINCT path) aggregation.
Starts a COUNT(DISTINCT path) aggregation using a type-safe ScalarPath.
Starts a MAX(path) aggregation.
Starts a MAX(path) aggregation using a type-safe ScalarPath.
Starts a MIN(path) aggregation.
Starts a MIN(path) aggregation using a type-safe ScalarPath.
Starts an aggregation from an arbitrary SQL expression. The expression is emitted verbatim into the generated SELECT list — callers are responsible for writing safe, dialect-compatible SQL.
Starts a SUM(path) aggregation.
Starts a SUM(path) aggregation using a type-safe ScalarPath.