org.hibernate.search.query.engine.impl

## Class FacetManagerImpl

- java.lang.Object
- - org.hibernate.search.query.engine.impl.FacetManagerImpl

- All Implemented Interfaces:
    FacetManager

      public class FacetManagerImpl
      extends Object
      implements FacetManager

  Default implementation of the `FacetManager` implementation.
  Author:
    Hardy Ferentschik

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FacetManagerImpl(AbstractHSQuery query)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `disableFaceting(String facetingName)` Disable a facet with the given name.
    `FacetManager` | `enableFaceting(FacetingRequest facetingRequest)` Enable a facet request.
    `QueryFilters` | `getFacetFilters()`
    `FacetSelection` | `getFacetGroup(String groupName)` Returns a instance of `FacetSelection` instance in order to apply a disjunction of facet criteria on the current query.
    `Map<String,FacetingRequest>` | `getFacetRequests()`
    `List<Facet>` | `getFacets(String facetingName)` Returns the `Facet`s for a given facet name
    `void` | `setFacetResults(Map<String,List<Facet>> facetResults)`

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

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

- - ### Constructor Detail

    - #### FacetManagerImpl

          public FacetManagerImpl(AbstractHSQuery query)

  - ### Method Detail

    - #### enableFaceting

          public FacetManager enableFaceting(FacetingRequest facetingRequest)

      Description copied from interface: `FacetManager`
      Enable a facet request.
      Specified by:
        `enableFaceting` in interface `FacetManager`
      Parameters:
        `facetingRequest` - the faceting request
      Returns:
        `this` to allow method chaining

    - #### disableFaceting

          public void disableFaceting(String facetingName)

      Description copied from interface: `FacetManager`
      Disable a facet with the given name.
      Specified by:
        `disableFaceting` in interface `FacetManager`
      Parameters:
        `facetingName` - the name of the facet to disable.

    - #### getFacets

          public List<Facet> getFacets(String facetingName)

      Description copied from interface: `FacetManager`
      Returns the `Facet`s for a given facet name
      Specified by:
        `getFacets` in interface `FacetManager`
      Parameters:
        `facetingName` - the facet name for which to return the facet list
      Returns:
        the facet result list which corresponds to the facet request with the given name. The empty list is returned for an unknown facet name.
      See Also:
        `FacetManager.enableFaceting(org.hibernate.search.query.facet.FacetingRequest)`

    - #### getFacetGroup

          public FacetSelection getFacetGroup(String groupName)

      Description copied from interface: `FacetManager`
      Returns a instance of `FacetSelection` instance in order to apply a disjunction of facet criteria on the current query.
      Specified by:
        `getFacetGroup` in interface `FacetManager`
      Parameters:
        `groupName` - the name the group. If the name is unknown an empty selection group is returned. `null` is not allowed.
      Returns:
        the `FacetSelection` for this group name if it exists., otherwise a new selection is created.

    - #### getFacetRequests

          public Map<String,FacetingRequest> getFacetRequests()

    - #### setFacetResults

          public void setFacetResults(Map<String,List<Facet>> facetResults)

    - #### getFacetFilters

          public QueryFilters getFacetFilters()

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved