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
ConstructorsConstructorDescriptionReactiveNosqlTemplate
(NosqlDbFactory nosqlDbFactory, MappingNosqlConverter mappingNosqlConverter) -
Method Summary
Modifier and TypeMethodDescriptionreactor.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<oracle.nosql.driver.values.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>
<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>
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<oracle.nosql.driver.values.MapValue>
runQueryNosqlParams
(NosqlEntityInformation<?, ?> entityInformation, String query, Map<String, oracle.nosql.driver.values.FieldValue> nosqlParams) nosqlParams is a Map of param_name to FieldValuevoid
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
-
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 interfaceorg.springframework.context.ApplicationContextAware
- Overrides:
setApplicationContext
in classNosqlTemplateBase
- Throws:
org.springframework.beans.BeansException
-
getTableName
Description copied from interface:ReactiveNosqlOperations
Returns the table name associated to the domainClass- Specified by:
getTableName
in interfaceReactiveNosqlOperations
- 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 interfaceReactiveNosqlOperations
-
dropTableIfExists
Drops table and returns true if result indicates table state changed to DROPPED or DROPPING. UsesNosqlDbFactory.getTableReqTimeout()
andNosqlDbFactory.getTableReqPollInterval()
to check the result.- Specified by:
dropTableIfExists
in interfaceReactiveNosqlOperations
-
findAll
public <T,ID> reactor.core.publisher.Flux<T> findAll(NosqlEntityInformation<T, ID> entityInformation) - Specified by:
findAll
in interfaceReactiveNosqlOperations
-
findAll
- Specified by:
findAll
in interfaceReactiveNosqlOperations
-
findById
- Specified by:
findById
in interfaceReactiveNosqlOperations
-
findById
public <T,ID> reactor.core.publisher.Mono<T> findById(NosqlEntityInformation<T, ID> entityInformation, ID id) - Specified by:
findById
in interfaceReactiveNosqlOperations
-
insert
public <T> reactor.core.publisher.Mono<T> insert(T entity) - Specified by:
insert
in interfaceReactiveNosqlOperations
-
insert
public <T,ID> reactor.core.publisher.Mono<T> insert(NosqlEntityInformation<?, ID> entityInformation, T entity) - Specified by:
insert
in interfaceReactiveNosqlOperations
-
update
public <T> reactor.core.publisher.Mono<T> update(T entity) - Specified by:
update
in interfaceReactiveNosqlOperations
-
update
public <T,ID> reactor.core.publisher.Mono<T> update(NosqlEntityInformation<?, ID> entityInformation, T entity) - Specified by:
update
in interfaceReactiveNosqlOperations
-
deleteById
public <ID> reactor.core.publisher.Mono<Void> deleteById(NosqlEntityInformation<?, ID> entityInformation, ID id) - Specified by:
deleteById
in interfaceReactiveNosqlOperations
-
deleteAll
- Specified by:
deleteAll
in interfaceReactiveNosqlOperations
-
delete
public <T,ID> reactor.core.publisher.Flux<T> delete(NosqlQuery query, NosqlEntityInformation<T, ID> entityInformation) - Specified by:
delete
in interfaceReactiveNosqlOperations
-
find
public <T> reactor.core.publisher.Flux<T> find(NosqlQuery query, NosqlEntityInformation<T, ?> entityInformation) - Specified by:
find
in interfaceReactiveNosqlOperations
-
exists
public reactor.core.publisher.Mono<Boolean> exists(NosqlQuery query, NosqlEntityInformation<?, ?> entityInformation) - Specified by:
exists
in interfaceReactiveNosqlOperations
-
existsById
public <ID> reactor.core.publisher.Mono<Boolean> existsById(NosqlEntityInformation<?, ID> entityInformation, ID id) - Specified by:
existsById
in interfaceReactiveNosqlOperations
-
count
- Specified by:
count
in interfaceReactiveNosqlOperations
-
count
public reactor.core.publisher.Mono<Long> count(NosqlQuery query, NosqlEntityInformation<?, ?> entityInformation) - Specified by:
count
in interfaceReactiveNosqlOperations
-
getConverter
- Specified by:
getConverter
in interfaceReactiveNosqlOperations
-
findAllById
public <T,ID> reactor.core.publisher.Flux<T> findAllById(NosqlEntityInformation<T, ID> entityInformation, org.reactivestreams.Publisher<ID> idStream) - Specified by:
findAllById
in interfaceReactiveNosqlOperations
-
runQueryNosqlParams
public Iterable<oracle.nosql.driver.values.MapValue> runQueryNosqlParams(NosqlEntityInformation<?, ?> entityInformation, String query, Map<String, oracle.nosql.driver.values.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<oracle.nosql.driver.values.MapValue> executeMapValueQuery(NosqlQuery query, NosqlEntityInformation<T, ?> entityInformation)
-