com.holonplatform.datastore.mongo.sync

## Interface MongoDatastore.Builder

- All Superinterfaces:
    com.holonplatform.core.datastore.DatastoreOperations.Builder<MongoDatastore,MongoDatastore.Builder>, com.holonplatform.core.ExpressionResolver.ExpressionResolverBuilder<MongoDatastore.Builder>, MongoDatastoreBuilder<MongoDatastore,com.mongodb.client.ClientSession,SyncMongoTransaction,MongoDatastore.Builder>
  Enclosing interface:
    MongoDatastore

      public static interface MongoDatastore.Builder
      extends MongoDatastoreBuilder<MongoDatastore,com.mongodb.client.ClientSession,SyncMongoTransaction,MongoDatastore.Builder>

  `MongoDatastore` builder.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `MongoDatastore.Builder` | `client(com.mongodb.client.MongoClient client)` Set the `MongoClient` to use.
    `<C extends com.holonplatform.core.datastore.DatastoreCommodity> MongoDatastore.Builder` | `withCommodity(SyncMongoDatastoreCommodityFactory<C> commodityFactory)` Register a `SyncMongoDatastoreCommodityFactory`.

    - ### Methods inherited from interface com.holonplatform.datastore.mongo.core.MongoDatastoreBuilder

      `database, enumCodecStrategy, readConcern, readPreference, transactionFactory, withCodec, withCodecProvider, writeConcern`

    - ### Methods inherited from interface com.holonplatform.core.datastore.DatastoreOperations.Builder

      `build, configuration, dataContextId, traceEnabled`

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

      `withExpressionResolver`

- - ### Method Detail

    - #### client

          MongoDatastore.Builder client(com.mongodb.client.MongoClient client)

      Set the `MongoClient` to use.
      Parameters:
        `client` - MongoClient to set (not null)
      Returns:
        this

    - #### withCommodity

          <C extends com.holonplatform.core.datastore.DatastoreCommodity> MongoDatastore.Builder withCommodity(SyncMongoDatastoreCommodityFactory<C> commodityFactory)

      Register a `SyncMongoDatastoreCommodityFactory`.
      Type Parameters:
        `C` - Commodity type
      Parameters:
        `commodityFactory` - The factory to register (not null)
      Returns:
        this

Copyright © 2019 The Holon Platform. All rights reserved.