com.holonplatform.core.query

## Interface QueryBuilder<Q extends QueryBuilder<Q>>

- Type Parameters:
    `Q` - Concrete QueryBuilder
  All Superinterfaces:
    DataTarget.DataTargetSupport<Q>, ExpressionResolver.ExpressionResolverBuilder<Q>, QueryAggregation.QueryAggregationSupport<Q>, QueryFilter.QueryFilterSupport<Q>, QuerySort.QuerySortSupport<Q>
  All Known Subinterfaces:
    Query, SubQuery<T>

      public interface QueryBuilder<Q extends QueryBuilder<Q>>
      extends QueryFilter.QueryFilterSupport<Q>, QuerySort.QuerySortSupport<Q>, DataTarget.DataTargetSupport<Q>, QueryAggregation.QueryAggregationSupport<Q>, ExpressionResolver.ExpressionResolverBuilder<Q>

  Builder to configure a `Query`, managing query `DataTarget` and query clauses such as `QueryFilter` and `QuerySort` and handling `ExpressionResolver`s registration.
  Since:
    5.0.0
  See Also:
    `Query`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `QueryConfiguration` | `getQueryConfiguration()` Get the current `QueryConfiguration`.
    `Q` | `limit(int limit)` Limit the fetched result set
    `Q` | `offset(int offset)` Starts the query results at a particular zero-based offset.
    `Q` | `parameter(String name, Object value)` Add a generic parameter to query
    `Q` | `restrict(int limit, int offset)` Convenience method to set `limit(int)` and `offset(int)` of query results both in one call

    - ### Methods inherited from interface com.holonplatform.core.query.QueryFilter.QueryFilterSupport

      `filter`

    - ### Methods inherited from interface com.holonplatform.core.query.QuerySort.QuerySortSupport

      `sort`

    - ### Methods inherited from interface com.holonplatform.core.datastore.DataTarget.DataTargetSupport

      `target, target`

    - ### Methods inherited from interface com.holonplatform.core.query.QueryAggregation.QueryAggregationSupport

      `aggregate, aggregate, aggregate`

    - ### Methods inherited from interface com.holonplatform.core.ExpressionResolver.ExpressionResolverBuilder

      `withExpressionResolver`

- - ### Method Detail

    - #### getQueryConfiguration

          QueryConfiguration getQueryConfiguration()

      Get the current `QueryConfiguration`.
      Returns:
        the current `QueryConfiguration`

    - #### limit

          Q limit(int limit)

      Limit the fetched result set
      Parameters:
        `limit` - Results limit. Must be > 0. A value <= 0 indicates no limit.
      Returns:
        this

    - #### offset

          Q offset(int offset)

      Starts the query results at a particular zero-based offset.
      Parameters:
        `offset` - Results offset 0-based index. Must be >= 0.
      Returns:
        this

    - #### restrict

          Q restrict(int limit,
                     int offset)

      Convenience method to set `limit(int)` and `offset(int)` of query results both in one call
      Parameters:
        `limit` - limit Results limit. Must be > 0. A value <= 0 indicates no limit.
        `offset` - offset Results offset 0-based index. Must be >= 0.
      Returns:
        this

    - #### parameter

          Q parameter(String name,
                      Object value)

      Add a generic parameter to query
      Parameters:
        `name` - Parameter name
        `value` - Parameter value
      Returns:
        this

Copyright © 2017 The Holon Platform. All rights reserved.