Package com.documentum.fc.client.search

# Interface IDfQueryDefinition

All Superinterfaces:
  `IDfSearchSourceContainer`

All Known Subinterfaces:
  `IDfPassThroughQuery`, `IDfQueryBuilder`

public interface IDfQueryDefinition extends IDfSearchSourceContainer
This is a base interface for the query that can be executed by the `IDfQueryProcessor`. Use `IDfSearchService` to initialize the IDfQueryProcessor with the IDfQueryDefinition.

See Also:
  - `IDfQueryProcessor`
  - `IDfSearchService.newQueryProcessor(IDfQueryDefinition, boolean)`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `QUERY_DEF_TYPE_BUILDER`
  Query type: Query Builder.
  `static final int`
  `QUERY_DEF_TYPE_PASSTHROUGH`
  Query type: Pass-through.
  `static final int`
  `QUERY_DEF_TYPE_UNDEFINED`
  Internal query type used to identify uninitialized query.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `IDfQueryDefinition`
  `copy()`
  Performs a deep copy of the query definition.
  `int`
  `getMaxResultCount()`
  Gets the global maximum result count to be expected from processing the query, for all search sources.
  `int`
  `getMaxResultPerSource()`
  Gets the maximum result count to be expected from one search source.
  `IDfSearchMetadataManager`
  `getMetadataMgr()`
  Provides access to an instance of the `IDfSearchMetadataManager` of the query.
  `int`
  `getQueryDefinitionType()`
  Get the Query definition type.
  `boolean`
  `isQueryBuilder()`
  Tests the `QUERY_DEF_TYPE_BUILDER` type.
  `void`
  `setMaxResultCount(int maxResultCount)`
  Sets the global maximum result count to be expected from processing the query, for all search sources.
  `void`
  `setMaxResultPerSource(int maxResultCount)`
  Sets the maximum result count to be expected from one search source.

  ### Methods inherited from interface com.documentum.fc.client.search.IDfSearchSourceContainer

  `addSelectedSource, clearSelectedSources, getSelectedSourceCount, getSelectedSources, removeSelectedSource`

- ## Field Details

  - ### QUERY_DEF_TYPE_UNDEFINED

    static final int QUERY_DEF_TYPE_UNDEFINED
    Internal query type used to identify uninitialized query.

    This field is reserved for future uses.
    See Also:
      - Constant Field Values

  - ### QUERY_DEF_TYPE_BUILDER

    static final int QUERY_DEF_TYPE_BUILDER
    Query type: Query Builder. Query of this type supports `IDfQueryBuilder` interface.
    See Also:
      - Constant Field Values

  - ### QUERY_DEF_TYPE_PASSTHROUGH

    static final int QUERY_DEF_TYPE_PASSTHROUGH
    Query type: Pass-through. Query of this type supports `IDfPassThroughQuery` interface.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getQueryDefinitionType

    int getQueryDefinitionType()
    Get the Query definition type. It can be one of the following:
    - `QUERY_DEF_TYPE_BUILDER`
    - `QUERY_DEF_TYPE_PASSTHROUGH`
    Returns:
      The query definition type.

  - ### isQueryBuilder

    boolean isQueryBuilder()
    Tests the `QUERY_DEF_TYPE_BUILDER` type. It is useful because this type is a primary type of the Query definition.
    Returns:
      `true`, if query type is `QUERY_DEF_TYPE_BUILDER`.

  - ### getMaxResultCount

    int getMaxResultCount()
    Gets the global maximum result count to be expected from processing the query, for all search sources.
    Note: the real maximum result count returned by the running query is computed according to this global maximum, the maximum defined by the administrator in the configuration file, and finally the maximum result count per source, set with `setMaxResPerSource()`.
    Returns:
      The global maximum result count defined for this query definition; or -1 if the maximum has not been defined in this query definition (in this case the maximum is the one defined by the configuration file).

  - ### setMaxResultCount

    void setMaxResultCount(int maxResultCount)
    Sets the global maximum result count to be expected from processing the query, for all search sources.
    Note: the real maximum result count returned by the running query is computed according to this global maximum, the maximum defined by the administrator in the configuration file, and finally the maximum result count per source, set with `setMaxResPerSource()`.
    Parameters:
      `maxResultCount` - The global maximum result count defined for this query definition; or -1 if the maximum is not defined in this query definition (in this case the maximum is the one defined by the configuration file).

  - ### getMaxResultPerSource

    int getMaxResultPerSource()
    Gets the maximum result count to be expected from one search source.
    Note: the real maximum result count returned by the running query is computed according to this global maximum , set with `setMaxResultCount()`, the maximum defined by the administrator in the configuration file, and finally this maximum result count per source.
    Returns:
      The maximum result count defined for each source; or -1 if there is no maximum.

  - ### setMaxResultPerSource

    void setMaxResultPerSource(int maxResultCount)
    Sets the maximum result count to be expected from one search source.
    Note: the real maximum result count returned by the running query is computed according to this global maximum , set with `setMaxResultCount()`, the maximum defined by the administrator in the configuration file, and finally this maximum result count per source.
    Parameters:
      `maxResultCount` - The maximum result count defined for each source; or -1 if there is no maximum.

  - ### getMetadataMgr

    IDfSearchMetadataManager getMetadataMgr()
    Provides access to an instance of the `IDfSearchMetadataManager` of the query. This instance is owned by the query definition; changing its state will impact the query. For example, using the `IDfSearchSourceContainer.addSelectedSource(String)` method for this instance will adjust selected sources for the query definition as well.
    Returns:
      A reference to the own instance of the `IDfSearchMetadataManager`.

  - ### copy

    IDfQueryDefinition copy()
    Performs a deep copy of the query definition.