com.tietoenator.trip.jxp.facet

## Class TdbSearchFacet

- java.lang.Object
- - com.tietoenator.trip.jxp.facet.TdbFacet
  - - com.tietoenator.trip.jxp.facet.TdbSearchFacet

- All Implemented Interfaces:
    com.tietoenator.trip.jxp.internal.utils.DOMSink, java.lang.Iterable<TdbFacetValue>

      public class TdbSearchFacet
      extends TdbFacet
      implements com.tietoenator.trip.jxp.internal.utils.DOMSink

  A type of facet whose values are each based on a a separate search order.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TdbSearchFacet(java.lang.String facetid)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(java.lang.String id, java.lang.String query)` Add a search order to generate a facet value.
    `void` | `clear()` Clears accumulated state from this object.
    `void` | `close()` Closes this facet by releasing server-side resources and removes the the accumulated state from the object.
    `TdbFacetValue` | `getValue(int index)` Retrieve a facet value object.
    `void` | `setSortOrder(TdbFacetSortOrder sortOrder)` Sets the sort order for the values of this facet.

    - ### Methods inherited from class com.tietoenator.trip.jxp.facet.TdbFacet

      `getBaselineKey, getBaselineSize, getDatabase, getDefaultTimeout, getFetchFrom, getFetchTo, getLowerFrequencyLimit, getName, getSearchSet, getSortOrder, getTimeout, getUpdateValueCount, getUpperFrequencyLimit, getValueCount, isBaselineAtEnd, isOpenExisting, isRegisterBaseline, isResetBaseline, isUseBaseline, iterator, setBaselineAtEnd, setBaselineKey, setBaselineSize, setDatabase, setDefaultTimeout, setFetchFrom, setFetchTo, setFrequencyLimits, setOpenExisting, setRegisterBaseline, setResetBaseline, setSearchSet, setTimeout, setUseBaseline`

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

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

    - ### Methods inherited from interface com.tietoenator.trip.jxp.internal.utils.DOMSink

      `sinkNode`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### TdbSearchFacet

          public TdbSearchFacet(java.lang.String facetid)

      Constructor
      Parameters:
        `facetid` - The unique, application assigned name of the facet.

  - ### Method Detail

    - #### setSortOrder

          public void setSortOrder(TdbFacetSortOrder sortOrder)
                            throws TdbException

      Sets the sort order for the values of this facet.

      The only sort order type supported for this facet class is Default. Any other value will result in a TdbException being thrown.

      Overrides:
        `setSortOrder` in class `TdbFacet`
      Parameters:
        `sortOrder` - Sort order type
      Throws:
        `TdbException` - Always thrown with code NOT_SUPPORTED unless assigned Default

    - #### clear

          public void clear()

      Description copied from class: `TdbFacet`
      Clears accumulated state from this object.
      Overrides:
        `clear` in class `TdbFacet`

    - #### close

          public void close()

      Description copied from class: `TdbFacet`
      Closes this facet by releasing server-side resources and removes the the accumulated state from the object.
      Specified by:
        `close` in class `TdbFacet`

    - #### add

          public void add(java.lang.String id,
                          java.lang.String query)

      Add a search order to generate a facet value.
      Parameters:
        `id` - Name or identity string for this facet (must be unique within the facet).
        `query` - CCL command - BASE, FIND, or FUZZ.

    - #### getValue

          public TdbFacetValue getValue(int index)
                                 throws TdbException

      Description copied from class: `TdbFacet`
      Retrieve a facet value object.
      Specified by:
        `getValue` in class `TdbFacet`
      Parameters:
        `index` - 0-based index of facet value
      Returns:
        TdbFacetValue object
      Throws:
        `TdbException` - If facet value could not be returned.