Class QuerySummary

java.lang.Object
com.axelor.meta.schema.queries.QuerySummary

public class QuerySummary extends Object
An aggregate over the whole filtered set, computed without the result window.

This is what lets a table caption a true query total. A total added up from the rows on screen is a total of those rows; where the result is a page or was truncated, presenting it as the query's total is simply wrong, and no amount of care in the client can recover the real number.

  • Constructor Details

    • QuerySummary

      public QuerySummary()
  • Method Details

    • getField

      public String getField()
      The field to aggregate, as a path in the query's own scope.
    • setField

      public void setField(String field)
    • getFn

      public String getFn()
      The aggregation method. Only row-combining functions are meaningful here.
    • setFn

      public void setFn(String fn)
    • getAs

      public String getAs()
      The name this total is reported under.

      Set it to the result column the total belongs to, so a consumer can pair them. Without it the total is named after the last segment of the field path, which only matches when the column was not aliased.

    • setAs

      public void setAs(String alias)
    • resultKey

      public String resultKey()
      The name this total is reported under, falling back to the field path's last segment.