com.holonplatform.datastore.mongo.core.expression

## Interface BsonProjection.Builder<R>

- Type Parameters:
    `R` - Projection result type
  Enclosing interface:
    BsonProjection<R>

      public static interface BsonProjection.Builder<R>

  Builder.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `BsonProjection<R>` | `build()` Build the `BsonProjection`.
    `BsonProjection.Builder<R>` | `converter(DocumentConverter<R> converter)` Set the document results converter.
    `BsonProjection.Builder<R>` | `countByField(String fieldName)` Set that this projection is a count projection on given field name.
    `BsonProjection.Builder<R>` | `field(String fieldName)` Add a projection field name.
    `BsonProjection.Builder<R>` | `field(String fieldName, org.bson.conversions.Bson bson)` Add a projection field.
    `BsonProjection.Builder<R>` | `hasAggregationFunctions(boolean hasAggregationFunctions)` Set whether this projection include one or more aggregation functions.

- - ### Method Detail

    - #### field

          BsonProjection.Builder<R> field(String fieldName,
                                          org.bson.conversions.Bson bson)

      Add a projection field.
      Parameters:
        `fieldName` - Projection field name (not null)
        `bson` - Field projection (not null)
      Returns:
        this

    - #### field

          BsonProjection.Builder<R> field(String fieldName)

      Add a projection field name.
      Parameters:
        `fieldName` - Projection field name (not null)
      Returns:
        this

    - #### converter

          BsonProjection.Builder<R> converter(DocumentConverter<R> converter)

      Set the document results converter.
      Parameters:
        `converter` - The converter to set
      Returns:
        this

    - #### hasAggregationFunctions

          BsonProjection.Builder<R> hasAggregationFunctions(boolean hasAggregationFunctions)

      Set whether this projection include one or more aggregation functions.
      Parameters:
        `hasAggregationFunctions` - whether this projection include one or more aggregation functions
      Returns:
        this

    - #### countByField

          BsonProjection.Builder<R> countByField(String fieldName)

      Set that this projection is a count projection on given field name.
      Parameters:
        `fieldName` - Field name
      Returns:
        this

    - #### build

          BsonProjection<R> build()

      Build the `BsonProjection`.
      Returns:
        A new `BsonProjection`

Copyright © 2019 The Holon Platform. All rights reserved.