Package com.oracle.nosql.spring.data.core

# Class ReactiveNosqlTemplate

java.lang.Object
com.oracle.nosql.spring.data.core.NosqlTemplateBase
com.oracle.nosql.spring.data.core.ReactiveNosqlTemplate

All Implemented Interfaces:
  `ReactiveNosqlOperations`, `org.springframework.beans.factory.Aware`, `org.springframework.context.ApplicationContextAware`

public class ReactiveNosqlTemplate extends NosqlTemplateBase implements ReactiveNosqlOperations, org.springframework.context.ApplicationContextAware

- ## Field Summary

  ### Fields inherited from class com.oracle.nosql.spring.data.core.NosqlTemplateBase

  `applicationContext, JSON_COLUMN, LOG, mappingNosqlConverter, nosqlClient, nosqlDbFactory, psCache`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ReactiveNosqlTemplate(NosqlDbFactory nosqlDbFactory, MappingNosqlConverter mappingNosqlConverter)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clearPreparedStatementsCache()`
  Clears the cache of prepared statements.
  `reactor.core.publisher.Mono<Long>`
  `count(NosqlQuery query, NosqlEntityInformation<?,?> entityInformation)`
  `reactor.core.publisher.Mono<Long>`
  `count(NosqlEntityInformation<?,?> entityInformation)`
  `static ReactiveNosqlTemplate`
  `create(NosqlDbConfig nosqlDBConfig)`
  `static ReactiveNosqlTemplate`
  `create(NosqlDbFactory nosqlDbFactory)`
  `reactor.core.publisher.Mono<Boolean>`
  `createTableIfNotExists(NosqlEntityInformation<?,?> entityInformation)`
  Creates a table for the given entity type if it doesn't exist.
  `<T, ID> reactor.core.publisher.Flux<T>`
  `delete(NosqlQuery query, NosqlEntityInformation<T,ID> entityInformation)`
  `reactor.core.publisher.Mono<Void>`
  `deleteAll(NosqlEntityInformation<?,?> entityInformation)`
  `<ID> reactor.core.publisher.Mono<Void>`
  `deleteById(NosqlEntityInformation<?,ID> entityInformation, ID id)`
  `reactor.core.publisher.Mono<Boolean>`
  `dropTableIfExists(String tableName)`
  Drops table and returns true if result indicates table state changed to DROPPED or DROPPING.
  `<T> reactor.core.publisher.Flux<MapValue>`
  `executeMapValueQuery(NosqlQuery query, NosqlEntityInformation<T,?> entityInformation)`
  `<T> reactor.core.publisher.Flux<T>`
  `executeQuery(NosqlQuery query, NosqlEntityInformation<T,?> entityInformation)`
  `reactor.core.publisher.Mono<Boolean>`
  `exists(NosqlQuery query, NosqlEntityInformation<?,?> entityInformation)`
  `<ID> reactor.core.publisher.Mono<Boolean>`
  `existsById(NosqlEntityInformation<?,ID> entityInformation, ID id)`
  `<T> reactor.core.publisher.Flux<T>`
  `find(NosqlQuery query, NosqlEntityInformation<T,?> entityInformation)`
  `<T, ID> reactor.core.publisher.Flux<T>`
  `findAll(NosqlEntityInformation<T,ID> entityInformation)`
  `<T> reactor.core.publisher.Flux<T>`
  `findAll(Class<T> entityClass)`
  `<T, ID> reactor.core.publisher.Flux<T>`
  `findAllById(NosqlEntityInformation<T,ID> entityInformation, org.reactivestreams.Publisher<ID> idStream)`
  `<T, ID> reactor.core.publisher.Mono<T>`
  `findById(NosqlEntityInformation<T,ID> entityInformation, ID id)`
  `<T> reactor.core.publisher.Mono<T>`
  `findById(Object id, Class<T> entityClass)`
  `MappingNosqlConverter`
  `getConverter()`
  `String`
  `getTableName(Class<?> domainClass)`
  Returns the table name associated to the domainClass
  `<T, ID> reactor.core.publisher.Mono<T>`
  `insert(NosqlEntityInformation<?,ID> entityInformation, T entity)`
  `<T> reactor.core.publisher.Mono<T>`
  `insert(T entity)`
  `Iterable<MapValue>`
  `runQueryNosqlParams(NosqlEntityInformation<?,?> entityInformation, String query, Map<String,FieldValue> nosqlParams)`
  nosqlParams is a Map of param_name to FieldValue
  `void`
  `setApplicationContext(org.springframework.context.ApplicationContext applicationContext)`
  `<T, ID> reactor.core.publisher.Mono<T>`
  `update(NosqlEntityInformation<?,ID> entityInformation, T entity)`
  `<T> reactor.core.publisher.Mono<T>`
  `update(T entity)`

  ### Methods inherited from class com.oracle.nosql.spring.data.core.NosqlTemplateBase

  `doCheckExistingTable, doCreateTable, doDelete, doExecuteMapValueQuery, doGet, doGetTable, doPut, doRunQueryNosqlParams, doTableRequest, doUpdate, getCreateTableDDL`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ReactiveNosqlTemplate

    public ReactiveNosqlTemplate(NosqlDbFactory nosqlDbFactory, MappingNosqlConverter mappingNosqlConverter)

- ## Method Details

  - ### create

    public static ReactiveNosqlTemplate create(NosqlDbConfig nosqlDBConfig) throws ClassNotFoundException
    Throws:
      `ClassNotFoundException`

  - ### create

    public static ReactiveNosqlTemplate create(NosqlDbFactory nosqlDbFactory) throws ClassNotFoundException
    Throws:
      `ClassNotFoundException`

  - ### setApplicationContext

    public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
    Specified by:
      `setApplicationContext` in interface `org.springframework.context.ApplicationContextAware`
    Overrides:
      `setApplicationContext` in class `NosqlTemplateBase`
    Throws:
      `org.springframework.beans.BeansException`

  - ### getTableName

    public String getTableName(Class<?> domainClass)
    Description copied from interface: `ReactiveNosqlOperations`
    Returns the table name associated to the domainClass
    Specified by:
      `getTableName` in interface `ReactiveNosqlOperations`
    Parameters:
      `domainClass` - the domain class
    Returns:
      the table name

  - ### createTableIfNotExists

    public reactor.core.publisher.Mono<Boolean> createTableIfNotExists(NosqlEntityInformation<?,?> entityInformation)
    Creates a table for the given entity type if it doesn't exist.
    Specified by:
      `createTableIfNotExists` in interface `ReactiveNosqlOperations`

  - ### dropTableIfExists

    public reactor.core.publisher.Mono<Boolean> dropTableIfExists(String tableName)
    Drops table and returns true if result indicates table state changed to DROPPED or DROPPING. Uses `NosqlDbFactory.getTableReqTimeout()` and `NosqlDbFactory.getTableReqPollInterval()` to check the result.
    Specified by:
      `dropTableIfExists` in interface `ReactiveNosqlOperations`

  - ### clearPreparedStatementsCache

    public void clearPreparedStatementsCache()
    Description copied from class: `NosqlTemplateBase`
    Clears the cache of prepared statements.
    Specified by:
      `clearPreparedStatementsCache` in interface `ReactiveNosqlOperations`
    Overrides:
      `clearPreparedStatementsCache` in class `NosqlTemplateBase`

  - ### findAll

    public <T, ID> reactor.core.publisher.Flux<T> findAll(NosqlEntityInformation<T,ID> entityInformation)
    Specified by:
      `findAll` in interface `ReactiveNosqlOperations`

  - ### findAll

    public <T> reactor.core.publisher.Flux<T> findAll(Class<T> entityClass)
    Specified by:
      `findAll` in interface `ReactiveNosqlOperations`

  - ### findById

    public <T> reactor.core.publisher.Mono<T> findById(Object id, Class<T> entityClass)
    Specified by:
      `findById` in interface `ReactiveNosqlOperations`

  - ### findById

    public <T, ID> reactor.core.publisher.Mono<T> findById(NosqlEntityInformation<T,ID> entityInformation, ID id)
    Specified by:
      `findById` in interface `ReactiveNosqlOperations`

  - ### insert

    public <T> reactor.core.publisher.Mono<T> insert(T entity)
    Specified by:
      `insert` in interface `ReactiveNosqlOperations`

  - ### insert

    public <T, ID> reactor.core.publisher.Mono<T> insert(NosqlEntityInformation<?,ID> entityInformation, T entity)
    Specified by:
      `insert` in interface `ReactiveNosqlOperations`

  - ### update

    public <T> reactor.core.publisher.Mono<T> update(T entity)
    Specified by:
      `update` in interface `ReactiveNosqlOperations`

  - ### update

    public <T, ID> reactor.core.publisher.Mono<T> update(NosqlEntityInformation<?,ID> entityInformation, T entity)
    Specified by:
      `update` in interface `ReactiveNosqlOperations`

  - ### deleteById

    public <ID> reactor.core.publisher.Mono<Void> deleteById(NosqlEntityInformation<?,ID> entityInformation, ID id)
    Specified by:
      `deleteById` in interface `ReactiveNosqlOperations`

  - ### deleteAll

    public reactor.core.publisher.Mono<Void> deleteAll(NosqlEntityInformation<?,?> entityInformation)
    Specified by:
      `deleteAll` in interface `ReactiveNosqlOperations`

  - ### delete

    public <T, ID> reactor.core.publisher.Flux<T> delete(NosqlQuery query, NosqlEntityInformation<T,ID> entityInformation)
    Specified by:
      `delete` in interface `ReactiveNosqlOperations`

  - ### find

    public <T> reactor.core.publisher.Flux<T> find(NosqlQuery query, NosqlEntityInformation<T,?> entityInformation)
    Specified by:
      `find` in interface `ReactiveNosqlOperations`

  - ### exists

    public reactor.core.publisher.Mono<Boolean> exists(NosqlQuery query, NosqlEntityInformation<?,?> entityInformation)
    Specified by:
      `exists` in interface `ReactiveNosqlOperations`

  - ### existsById

    public <ID> reactor.core.publisher.Mono<Boolean> existsById(NosqlEntityInformation<?,ID> entityInformation, ID id)
    Specified by:
      `existsById` in interface `ReactiveNosqlOperations`

  - ### count

    public reactor.core.publisher.Mono<Long> count(NosqlEntityInformation<?,?> entityInformation)
    Specified by:
      `count` in interface `ReactiveNosqlOperations`

  - ### count

    public reactor.core.publisher.Mono<Long> count(NosqlQuery query, NosqlEntityInformation<?,?> entityInformation)
    Specified by:
      `count` in interface `ReactiveNosqlOperations`

  - ### getConverter

    public MappingNosqlConverter getConverter()
    Specified by:
      `getConverter` in interface `ReactiveNosqlOperations`

  - ### findAllById

    public <T, ID> reactor.core.publisher.Flux<T> findAllById(NosqlEntityInformation<T,ID> entityInformation, org.reactivestreams.Publisher<ID> idStream)
    Specified by:
      `findAllById` in interface `ReactiveNosqlOperations`

  - ### runQueryNosqlParams

    public Iterable<MapValue> runQueryNosqlParams(NosqlEntityInformation<?,?> entityInformation, String query, Map<String,FieldValue> nosqlParams)
    nosqlParams is a Map of param_name to FieldValue

  - ### executeQuery

    public <T> reactor.core.publisher.Flux<T> executeQuery(NosqlQuery query, NosqlEntityInformation<T,?> entityInformation)

  - ### executeMapValueQuery

    public <T> reactor.core.publisher.Flux<MapValue> executeMapValueQuery(NosqlQuery query, NosqlEntityInformation<T,?> entityInformation)