com.holonplatform.datastore.mongo.core.expression

## Interface BsonQueryDefinition.Builder

- Enclosing interface:
    BsonQueryDefinition

      public static interface BsonQueryDefinition.Builder

  Builder

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `BsonQueryDefinition.Builder` | `batchSize(int batchSize)` Set the query batch size.
    `BsonQueryDefinition` | `build()` Build the query definition.
    `BsonQueryDefinition.Builder` | `collation(com.mongodb.client.model.Collation collation)` Set the `Collation` to use.
    `BsonQueryDefinition.Builder` | `collectionName(String collectionName)` Set the query collection name.
    `BsonQueryDefinition.Builder` | `comment(String comment)` Set the query comment.
    `BsonQueryDefinition.Builder` | `cursorType(com.mongodb.CursorType cursorType)` Set the cursor type.
    `BsonQueryDefinition.Builder` | `distinct(boolean distinct)` Set whether the query should return distinct results.
    `BsonQueryDefinition.Builder` | `filter(BsonFilterExpression filter)` Set the query filter.
    `BsonQueryDefinition.Builder` | `group(org.bson.conversions.Bson group)` Set the group id for aggregation type query.
    `BsonQueryDefinition.Builder` | `groupFilter(BsonFilterExpression groupFilter)` Set the filter to apply to the group stage in an aggregation type query.
    `BsonQueryDefinition.Builder` | `hint(org.bson.conversions.Bson hint)` Set the hint for which index to use.
    `BsonQueryDefinition.Builder` | `limit(int limit)` Set the query results limit.
    `BsonQueryDefinition.Builder` | `max(org.bson.conversions.Bson max)` Set the exclusive upper bound for a specific index.
    `BsonQueryDefinition.Builder` | `min(org.bson.conversions.Bson min)` Set the inclusive lower bound for a specific index.
    `BsonQueryDefinition.Builder` | `offset(int offset)` Set the query results offset.
    `BsonQueryDefinition.Builder` | `partial(boolean partial)` Set whether to get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
    `BsonQueryDefinition.Builder` | `returnKey(boolean returnKey)` Set whether the find operation will return only the index keys in the resulting documents.
    `BsonQueryDefinition.Builder` | `showRecordId(boolean showRecordId)` Set whether to add a `$recordId` field to the returned documents.
    `BsonQueryDefinition.Builder` | `sort(org.bson.conversions.Bson sort)` Set the query sort.
    `BsonQueryDefinition.Builder` | `timeout(long timeout, TimeUnit timeoutUnit)` Set the query execution timeout.

- - ### Method Detail

    - #### collectionName

          BsonQueryDefinition.Builder collectionName(String collectionName)

      Set the query collection name.
      Parameters:
        `collectionName` - The collection name
      Returns:
        this

    - #### distinct

          BsonQueryDefinition.Builder distinct(boolean distinct)

      Set whether the query should return distinct results.
      Parameters:
        `distinct` - Whether the query should return distinct results
      Returns:
        this

    - #### filter

          BsonQueryDefinition.Builder filter(BsonFilterExpression filter)

      Set the query filter.
      Parameters:
        `filter` - Filter to set
      Returns:
        this

    - #### sort

          BsonQueryDefinition.Builder sort(org.bson.conversions.Bson sort)

      Set the query sort.
      Parameters:
        `sort` - Sort to set
      Returns:
        this

    - #### group

          BsonQueryDefinition.Builder group(org.bson.conversions.Bson group)

      Set the group id for aggregation type query.
      Parameters:
        `group` - Group id to set
      Returns:
        this

    - #### groupFilter

          BsonQueryDefinition.Builder groupFilter(BsonFilterExpression groupFilter)

      Set the filter to apply to the group stage in an aggregation type query.
      Parameters:
        `groupFilter` - Group filter to set
      Returns:
        this

    - #### limit

          BsonQueryDefinition.Builder limit(int limit)

      Set the query results limit.
      Parameters:
        `limit` - Limit to set
      Returns:
        this

    - #### offset

          BsonQueryDefinition.Builder offset(int offset)

      Set the query results offset.
      Parameters:
        `offset` - Offset to set
      Returns:
        this

    - #### timeout

          BsonQueryDefinition.Builder timeout(long timeout,
                                              TimeUnit timeoutUnit)

      Set the query execution timeout.
      Parameters:
        `timeout` - Timeout value
        `timeoutUnit` - Timeout unit
      Returns:
        this

    - #### cursorType

          BsonQueryDefinition.Builder cursorType(com.mongodb.CursorType cursorType)

      Set the cursor type.
      Parameters:
        `cursorType` - the cursor type to set
      Returns:
        this

    - #### partial

          BsonQueryDefinition.Builder partial(boolean partial)

      Set whether to get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
      Parameters:
        `partial` - `true` to get partial results from a sharded cluster if one or more shards are unreachable
      Returns:
        this

    - #### batchSize

          BsonQueryDefinition.Builder batchSize(int batchSize)

      Set the query batch size.
      Parameters:
        `batchSize` - the batch size to set
      Returns:
        this

    - #### collation

          BsonQueryDefinition.Builder collation(com.mongodb.client.model.Collation collation)

      Set the `Collation` to use.
      Parameters:
        `collation` - The collation to set
      Returns:
        this

    - #### comment

          BsonQueryDefinition.Builder comment(String comment)

      Set the query comment.
      Parameters:
        `comment` - The comment to set
      Returns:
        this

    - #### hint

          BsonQueryDefinition.Builder hint(org.bson.conversions.Bson hint)

      Set the hint for which index to use.
      Parameters:
        `hint` - The index hint to set
      Returns:
        this

    - #### max

          BsonQueryDefinition.Builder max(org.bson.conversions.Bson max)

      Set the exclusive upper bound for a specific index.
      Parameters:
        `max` - The index upped bound
      Returns:
        this

    - #### min

          BsonQueryDefinition.Builder min(org.bson.conversions.Bson min)

      Set the inclusive lower bound for a specific index.
      Parameters:
        `min` - The index lower bound
      Returns:
        this

    - #### returnKey

          BsonQueryDefinition.Builder returnKey(boolean returnKey)

      Set whether the find operation will return only the index keys in the resulting documents.
      Parameters:
        `returnKey` - whether the find operation will return only the index keys in the resulting documents
      Returns:
        this

    - #### showRecordId

          BsonQueryDefinition.Builder showRecordId(boolean showRecordId)

      Set whether to add a `$recordId` field to the returned documents.
      Parameters:
        `showRecordId` - whether to add a `$recordId` field to the returned documents
      Returns:
        this

    - #### build

          BsonQueryDefinition build()

      Build the query definition.
      Returns:
        the query definition instance

Copyright © 2019 The Holon Platform. All rights reserved.