com.holonplatform.reactor.datastore

## Interface ReactiveDatastore

- All Superinterfaces:
    com.holonplatform.core.datastore.ConfigurableDatastore, com.holonplatform.core.datastore.DataContextBound, com.holonplatform.core.datastore.DatastoreCommodityHandler, com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>, com.holonplatform.core.ExpressionResolver.ExpressionResolverSupport, Serializable

      public interface ReactiveDatastore
      extends com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>, com.holonplatform.core.datastore.ConfigurableDatastore, Serializable

  Reactive `DatastoreOperations` API, which can be used to execute the Datastore operations and obtain the the results asynchronously, using `Flux` and `Mono` to represent and handle the operations outcome.

  Extends `DatastoreCommodityHandler` to support `DatastoreCommodity` creation by type.

  Extends `ExpressionResolver.ExpressionResolverSupport` to allow `ExpressionResolver`s registration, which can be used to extend and/or customize the datastore operations.

  Since:
    5.2.0
  See Also:
    `Datastore`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.datastore.DatastoreOperations

      `com.holonplatform.core.datastore.DatastoreOperations.Builder<D extends com.holonplatform.core.datastore.DatastoreOperations,B extends com.holonplatform.core.datastore.DatastoreOperations.Builder<D,B>>, com.holonplatform.core.datastore.DatastoreOperations.WriteOption`

  - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default ReactiveBulkDelete` | `bulkDelete(com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)`
    `default ReactiveBulkInsert` | `bulkInsert(com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.property.PropertySet<?> propertySet, com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)`
    `default ReactiveBulkUpdate` | `bulkUpdate(com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)`
    `default reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>` | `delete(com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.property.PropertyBox propertyBox, com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)`
    `default reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>` | `insert(com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.property.PropertyBox propertyBox, com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)`
    `default Optional<ReactiveTransactional>` | `isTransactional()` Check if this Datastore is `ReactiveTransactional`, i.e.
    `default ReactiveQuery` | `query()`
    `default ReactiveQuery` | `query(com.holonplatform.core.datastore.DataTarget<?> target)` Create a `ReactiveQuery` commodity, setting given `target` as query data target.
    `default reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>` | `refresh(com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.property.PropertyBox propertyBox)`
    `default ReactiveTransactional` | `requireTransactional()` Requires this Datastore to be `ReactiveTransactional`, i.e.
    `default reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>` | `save(com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.property.PropertyBox propertyBox, com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)`
    `default reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>` | `update(com.holonplatform.core.datastore.DataTarget<?> target, com.holonplatform.core.property.PropertyBox propertyBox, com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)`

    - ### Methods inherited from interface com.holonplatform.core.datastore.DatastoreCommodityHandler

      `create, getAvailableCommodities, hasCommodity`

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

      `addExpressionResolver, addExpressionResolvers, removeExpressionResolver`

    - ### Methods inherited from interface com.holonplatform.core.datastore.DataContextBound

      `getDataContextId`

- - ### Method Detail

    - #### refresh

          default reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox> refresh(com.holonplatform.core.datastore.DataTarget<?> target,
                                                                                                   com.holonplatform.core.property.PropertyBox propertyBox)

      Specified by:
        `refresh` in interface `com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>`

    - #### insert

          default reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult> insert(com.holonplatform.core.datastore.DataTarget<?> target,
                                                                                                                 com.holonplatform.core.property.PropertyBox propertyBox,
                                                                                                                 com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)

      Specified by:
        `insert` in interface `com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>`

    - #### update

          default reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult> update(com.holonplatform.core.datastore.DataTarget<?> target,
                                                                                                                 com.holonplatform.core.property.PropertyBox propertyBox,
                                                                                                                 com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)

      Specified by:
        `update` in interface `com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>`

    - #### save

          default reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult> save(com.holonplatform.core.datastore.DataTarget<?> target,
                                                                                                               com.holonplatform.core.property.PropertyBox propertyBox,
                                                                                                               com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)

      Specified by:
        `save` in interface `com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>`

    - #### delete

          default reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult> delete(com.holonplatform.core.datastore.DataTarget<?> target,
                                                                                                                 com.holonplatform.core.property.PropertyBox propertyBox,
                                                                                                                 com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)

      Specified by:
        `delete` in interface `com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>`

    - #### bulkInsert

          default ReactiveBulkInsert bulkInsert(com.holonplatform.core.datastore.DataTarget<?> target,
                                                com.holonplatform.core.property.PropertySet<?> propertySet,
                                                com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)

      Specified by:
        `bulkInsert` in interface `com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>`

    - #### bulkUpdate

          default ReactiveBulkUpdate bulkUpdate(com.holonplatform.core.datastore.DataTarget<?> target,
                                                com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)

      Specified by:
        `bulkUpdate` in interface `com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>`

    - #### bulkDelete

          default ReactiveBulkDelete bulkDelete(com.holonplatform.core.datastore.DataTarget<?> target,
                                                com.holonplatform.core.datastore.DatastoreOperations.WriteOption... options)

      Specified by:
        `bulkDelete` in interface `com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>`

    - #### query

          default ReactiveQuery query()

      Specified by:
        `query` in interface `com.holonplatform.core.datastore.DatastoreOperations<reactor.core.publisher.Mono<com.holonplatform.core.datastore.Datastore.OperationResult>,reactor.core.publisher.Mono<com.holonplatform.core.property.PropertyBox>,ReactiveBulkInsert,ReactiveBulkUpdate,ReactiveBulkDelete,ReactiveQuery>`

    - #### query

          default ReactiveQuery query(com.holonplatform.core.datastore.DataTarget<?> target)

      Create a `ReactiveQuery` commodity, setting given `target` as query data target.
      Parameters:
        `target` - Query data target (not null)
      Returns:
        A new `ReactiveQuery` instance, which can be used to configure and execute an asynchronous query

    - #### isTransactional

          default Optional<ReactiveTransactional> isTransactional()

      Check if this Datastore is `ReactiveTransactional`, i.e. supports execution of transactional operations.
      Returns:
        If this Datastore is transactional, return the Datastore as `ReactiveTransactional`, or an empty Optional otherwise

    - #### requireTransactional

          default ReactiveTransactional requireTransactional()

      Requires this Datastore to be `ReactiveTransactional`, i.e. to support execution of transactional operations, throwing an `IllegalStateException` if this Datastore is not transactional.
      Returns:
        the Datastore as `ReactiveTransactional`
      Throws:
        `IllegalStateException` - If this Datastore is not transactional

Copyright © 2019 The Holon Platform. All rights reserved.