com.tietoenator.trip.jxp.facet

## Class TdbFieldTermFacet

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

- All Implemented Interfaces:
    java.lang.Iterable<TdbFacetValue>
  Direct Known Subclasses:
    TdbClassificationFacet, TdbKvpFacet

      public class TdbFieldTermFacet
      extends TdbFacet

  A facet whose values are a subset of the terms of a TRIP database field.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TdbFieldTermFacet(java.lang.String fieldname)` Create a facet based on a field in the currently open database or in a search set.
    `TdbFieldTermFacet(java.lang.String fieldname, java.lang.String mask)` Create a facet based on a field in the currently open database

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `int` | `getFetchSize()` The number of values for that this facet will request from TRIPsystem per network request.
    `java.lang.String` | `getMask()` Returns the comparison mask
    `TdbFacetValue` | `getValue(int index)` Retrieve a facet value object.
    `void` | `setFetchSize(int size)` The number of values for that this facet will request from TRIPsystem per network request.
    `void` | `setMask(java.lang.String newMask)` Alter the search mask for the 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, setSortOrder, setTimeout, setUseBaseline`

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

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

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

      `forEach, spliterator`

- - ### Constructor Detail

    - #### TdbFieldTermFacet

          public TdbFieldTermFacet(java.lang.String fieldname)
                            throws TdbException

      Create a facet based on a field in the currently open database or in a search set.
      Parameters:
        `fieldname` - Name of field or view
      Throws:
        `TdbException` - If invalid arguments were supplied.

    - #### TdbFieldTermFacet

          public TdbFieldTermFacet(java.lang.String fieldname,
                                   java.lang.String mask)
                            throws TdbException

      Create a facet based on a field in the currently open database
      Parameters:
        `fieldname` - Name of field or view
        `mask` - Comparison mask to select values from the field
      Throws:
        `TdbException` - If invalid arguments were supplied.

  - ### Method Detail

    - #### getFetchSize

          public int getFetchSize()

      The number of values for that this facet will request from TRIPsystem per network request. The default is 100. Set this to a higher number if your application immediately need access to more values than that.
      Returns:
        Number of values fetched from TRIPsystem at a time.

    - #### setFetchSize

          public void setFetchSize(int size)

      The number of values for that this facet will request from TRIPsystem per network request. The default is 100 and the max valid value is 10000. Set this to a higher number if your application immediately need access to more values than that.
      Parameters:
        `size` - Number of facet values to fetch from TRIPsystem at a time

    - #### getMask

          public java.lang.String getMask()

      Returns the comparison mask

    - #### setMask

          public void setMask(java.lang.String newMask)
                       throws TdbException

      Alter the search mask for the facet.
      Throws:
        `TdbException`

    - #### 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`

    - #### 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.