com.google.appengine.api.search.checkers

## Class FacetQueryChecker

- java.lang.Object
- - com.google.appengine.api.search.checkers.FacetQueryChecker

-     public final class FacetQueryChecker
      extends java.lang.Object

  Provides checks for faceted search related query options.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.Integer` | `checkDepth(java.lang.Integer value)` Checks that a facet depth option is valid.
    `static int` | `checkDiscoveryLimit(int value)` Checks that a discovery limit is valid.
    `static java.lang.Integer` | `checkDiscoveryValueLimit(java.lang.Integer value)` Checks whether discovery value limit option is valid.
    `static java.lang.String` | `checkFacetValue(java.lang.String value)` Checks that a value constraint is valid.
    `static SearchParams` | `checkValid(SearchParams params)` Checks whether all options related to faceted search are valid.
    `static java.lang.Integer` | `checkValueLimit(java.lang.Integer value)` Checks whether a value limit option is valid.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### checkDiscoveryLimit

          public static int checkDiscoveryLimit(int value)

      Checks that a discovery limit is valid. The value must be greater than 0 and less than `SearchApiLimits.FACET_MAXIMUM_DISCOVERY_LIMIT`.
      Parameters:
        `value` - the discovery limit to check
      Returns:
        the discovery limit
      Throws:
        `java.lang.IllegalArgumentException` - if the discovery limit is less than 1 or greater than SearchApiLimits#FACET_MAXIMUM_DISCOVERY_LIMIT.

    - #### checkFacetValue

          public static java.lang.String checkFacetValue(java.lang.String value)

      Checks that a value constraint is valid. The Value length must be at least 1 and less than `SearchApiLimits.MAXIMUM_ATOM_LENGTH`.
      Parameters:
        `value` - the value constraint to check
      Returns:
        the value constraint
      Throws:
        `java.lang.IllegalArgumentException` - if the Value length is less than 1 or greater than SearchApiLimits#FACET_MAXIMUM_VALUE_LENGTH.

    - #### checkDepth

          public static java.lang.Integer checkDepth(java.lang.Integer value)

      Checks that a facet depth option is valid. The facet depth must be greater than 0 and less than `SearchApiLimits.FACET_MAXIMUM_DEPTH`.
      Parameters:
        `value` - the facet depth option to check
      Returns:
        the facet depth
      Throws:
        `java.lang.IllegalArgumentException` - if the facet depth option is less than 1 or greater than SearchApiLimits#FACET_MAXIMUM_DEPTH.

    - #### checkDiscoveryValueLimit

          public static java.lang.Integer checkDiscoveryValueLimit(java.lang.Integer value)

      Checks whether discovery value limit option is valid. The discovery value limit must be greater than 0 and less than `SearchApiLimits.FACET_MAXIMUM_VALUE_LIMIT`.
      Parameters:
        `value` - the discovery value limit to check
      Returns:
        the discovery value limit
      Throws:
        `java.lang.IllegalArgumentException` - if the discovery value limit is less than 1 or greater than SearchApiLimits#FACET_MAXIMUM_VALUE_LIMIT.

    - #### checkValueLimit

          public static java.lang.Integer checkValueLimit(java.lang.Integer value)

      Checks whether a value limit option is valid. The value limit must be greater than 0 and less than `SearchApiLimits.FACET_MAXIMUM_VALUE_LIMIT`.
      Parameters:
        `value` - the value limit to check
      Returns:
        the value limit
      Throws:
        `java.lang.IllegalArgumentException` - if the value limit is less than 1 or greater than SearchApiLimits#FACET_MAXIMUM_VALUE_LIMIT.

    - #### checkValid

          public static SearchParams checkValid(SearchParams params)

      Checks whether all options related to faceted search are valid.
      Parameters:
        `params` - the SearchParams to check
      Returns:
        this checked SearchParams
      Throws:
        `java.lang.IllegalArgumentException` - if some part of the specification is invalid