com.holonplatform.core.datastore.beans

## Interface BeanQueryBuilder<Q extends BeanQueryBuilder<Q>>

- Type Parameters:
    `Q` - Concrete BeanQueryBuilder
  All Superinterfaces:
    ExpressionResolver.ExpressionResolverBuilder<Q>, QueryAggregation.QueryAggregationSupport<Q>, QueryFilter.QueryFilterSupport<Q>, QuerySort.QuerySortSupport<Q>
  All Known Subinterfaces:
    BeanQuery<T>

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

  Builder to configure a bean based query.
  Since:
    5.1.0

- - ### 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.
    `<T> Q` | `parameter(ConfigProperty<T> property, T value)` Add a parameter to query using a `ConfigProperty` and `ConfigProperty.getKey()` as parameter name.
    `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, filter, filter`

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

      `sort, sort, sort`

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

    - #### parameter

          <T> Q parameter(ConfigProperty<T> property,
                          T value)

      Add a parameter to query using a `ConfigProperty` and `ConfigProperty.getKey()` as parameter name.
      Type Parameters:
        `T` - Config property type
      Parameters:
        `property` - The configuration property (not null)
        `value` - Parameter value
      Returns:
        this

Copyright © 2019 The Holon Platform. All rights reserved.