Class Counts

java.lang.Object
org.apache.juneau.commons.beanquery.Counts

public final class Counts extends Object
The two neutral row counts a session can report: total() (the rows in scope before the query's search) and matched() (the rows that survive the search, before any page limit).

These names are transport-neutral on purpose; a request-facing adapter maps them to its own vocabulary (for example a DataTables adapter maps total→recordsTotal and matched→recordsFiltered).

Since:
10.0.0
  • Method Details

    • of

      public static Counts of(long total, long matched)
      Creates a counts result.
      Parameters:
      total - The rows in scope before the search.
      matched - The rows that survive the search, before any page limit.
      Returns:
      A new counts result.
    • total

      public long total()
      The number of rows in scope before the query's search (after any server-only guard).
      Returns:
      The total row count.
    • matched

      public long matched()
      The number of rows that survive the search, before any page limit.
      Returns:
      The matched row count.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object