Enum Class CountRequest

java.lang.Object
java.lang.Enum<CountRequest>
org.apache.juneau.commons.beanquery.CountRequest
All Implemented Interfaces:
Serializable, Comparable<CountRequest>, Constable

public enum CountRequest extends Enum<CountRequest>
What a caller asks BeanQuery.Builder.counts(CountRequest) to write onto a BeanQuery's opts (design ยง5).

This is the builder-facing counterpart of the session-side CountPolicy: CountPolicy decides whether a session honors a count request at all; CountRequest is what the request asks for.

Example:

BeanQuery q = BeanQuery.create().counts(CountRequest.BOTH).build();

Since:
10.0.0
  • Enum Constant Details

    • NONE

      public static final CountRequest NONE
      Request no counts. Writing this removes the counts opt if one was set.
    • MATCHED

      public static final CountRequest MATCHED
      Request only the matched-row count (counts=matched).
    • BOTH

      public static final CountRequest BOTH
      Request both the total and matched counts (counts=both).
  • Method Details

    • values

      public static CountRequest[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CountRequest valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null