@API(status=STABLE,
since="6.0")
public final class ReactiveNeo4jTemplate
extends Object
implements ReactiveNeo4jOperations, ReactiveFluentNeo4jOperations, BeanClassLoaderAware, BeanFactoryAware
ReactiveNeo4jOperations.ExecutableQuery<T>ReactiveFluentFindOperation.ExecutableFind<T>, ReactiveFluentFindOperation.FindWithProjection<T>, ReactiveFluentFindOperation.FindWithQuery<T>, ReactiveFluentFindOperation.TerminatingFind<T>, ReactiveFluentFindOperation.TerminatingFindWithoutQuery<T>ReactiveFluentSaveOperation.ExecutableSave<DT>| Constructor and Description |
|---|
ReactiveNeo4jTemplate(ReactiveNeo4jClient neo4jClient,
Neo4jMappingContext neo4jMappingContext) |
ReactiveNeo4jTemplate(ReactiveNeo4jClient neo4jClient,
Neo4jMappingContext neo4jMappingContext,
ReactiveDatabaseSelectionProvider databaseSelectionProvider)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Long> |
count(Class<?> domainType)
Counts the number of entities of a given type.
|
reactor.core.publisher.Mono<Long> |
count(org.neo4j.cypherdsl.core.Statement statement)
Counts the number of entities of a given type.
|
reactor.core.publisher.Mono<Long> |
count(org.neo4j.cypherdsl.core.Statement statement,
Map<String,Object> parameters)
Counts the number of entities of a given type.
|
reactor.core.publisher.Mono<Long> |
count(String cypherQuery)
Counts the number of entities of a given type.
|
reactor.core.publisher.Mono<Long> |
count(String cypherQuery,
Map<String,Object> parameters)
Counts the number of entities of a given type.
|
reactor.core.publisher.Mono<Void> |
deleteAll(Class<?> domainType)
Delete all entities of a given type.
|
<T> reactor.core.publisher.Mono<Void> |
deleteAllById(Iterable<?> ids,
Class<T> domainType)
Deletes all entities with one of the given ids, including all entities related to that entity.
|
<T> reactor.core.publisher.Mono<Void> |
deleteById(Object id,
Class<T> domainType)
Deletes a single entity including all entities related to that entity.
|
<T> reactor.core.publisher.Mono<Void> |
deleteByIdWithVersion(Object id,
Class<T> domainType,
Neo4jPersistentProperty versionProperty,
Object versionValue) |
<T> ReactiveFluentFindOperation.ExecutableFind<T> |
find(Class<T> domainType)
Start creating a find operation for the given domainType.
|
<T> reactor.core.publisher.Flux<T> |
findAll(Class<T> domainType)
Load all entities of a given type.
|
<T> reactor.core.publisher.Flux<T> |
findAll(org.neo4j.cypherdsl.core.Statement statement,
Class<T> domainType)
Load all entities of a given type by executing given statement.
|
<T> reactor.core.publisher.Flux<T> |
findAll(org.neo4j.cypherdsl.core.Statement statement,
Map<String,Object> parameters,
Class<T> domainType)
Load all entities of a given type by executing given statement with parameters.
|
<T> reactor.core.publisher.Flux<T> |
findAll(String cypherQuery,
Class<T> domainType)
Load all entities of a given type by executing given statement.
|
<T> reactor.core.publisher.Flux<T> |
findAll(String cypherQuery,
Map<String,Object> parameters,
Class<T> domainType)
Load all entities of a given type by executing given statement with parameters.
|
<T> reactor.core.publisher.Flux<T> |
findAllById(Iterable<?> ids,
Class<T> domainType)
Load all entities of a given type that are identified by the given ids.
|
<T> reactor.core.publisher.Mono<T> |
findById(Object id,
Class<T> domainType)
Load an entity from the database.
|
<T> reactor.core.publisher.Mono<T> |
findOne(org.neo4j.cypherdsl.core.Statement statement,
Map<String,Object> parameters,
Class<T> domainType)
Load one entity of a given type by executing given statement with parameters.
|
<T> reactor.core.publisher.Mono<T> |
findOne(String cypherQuery,
Map<String,Object> parameters,
Class<T> domainType)
Load one entity of a given type by executing given statement with parameters.
|
<T> ReactiveFluentSaveOperation.ExecutableSave<T> |
save(Class<T> domainType)
Start creating a save operation for the given domainType.
|
<T> reactor.core.publisher.Mono<T> |
save(T instance)
Saves an instance of an entity, including all the related entities of the entity.
|
<T> reactor.core.publisher.Flux<T> |
saveAll(Iterable<T> instances)
Saves several instances of an entity, including all the related entities of the entity.
|
<T,R> reactor.core.publisher.Flux<R> |
saveAllAs(Iterable<T> instances,
Class<R> resultType)
Saves several instances of an entity, including the properties and relationship defined by the project
resultType. |
<T,R> reactor.core.publisher.Mono<R> |
saveAs(T instance,
Class<R> resultType)
Saves an instance of an entity, including the properties and relationship defined by the projected
resultType. |
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setBeanFactory(BeanFactory beanFactory) |
<T> reactor.core.publisher.Mono<ReactiveNeo4jOperations.ExecutableQuery<T>> |
toExecutableQuery(Class<T> domainType,
QueryFragmentsAndParameters queryFragmentsAndParameters)
Create an executable query based on query fragment.
|
<T> reactor.core.publisher.Mono<ReactiveNeo4jOperations.ExecutableQuery<T>> |
toExecutableQuery(PreparedQuery<T> preparedQuery)
Takes a prepared query, containing all the information about the cypher template to be used, needed parameters and
an optional mapping function, and turns it into an executable query.
|
@Deprecated public ReactiveNeo4jTemplate(ReactiveNeo4jClient neo4jClient, Neo4jMappingContext neo4jMappingContext, ReactiveDatabaseSelectionProvider databaseSelectionProvider)
public ReactiveNeo4jTemplate(ReactiveNeo4jClient neo4jClient, Neo4jMappingContext neo4jMappingContext)
public reactor.core.publisher.Mono<Long> count(Class<?> domainType)
ReactiveNeo4jOperationscount in interface ReactiveNeo4jOperationsdomainType - the type of the entities to be counted.null.public reactor.core.publisher.Mono<Long> count(org.neo4j.cypherdsl.core.Statement statement)
ReactiveNeo4jOperationscount in interface ReactiveNeo4jOperationsstatement - the Cypher Statement that returns the count.null.public reactor.core.publisher.Mono<Long> count(org.neo4j.cypherdsl.core.Statement statement, Map<String,Object> parameters)
ReactiveNeo4jOperationscount in interface ReactiveNeo4jOperationsstatement - the Cypher Statement that returns the count.parameters - Map of parameters. Must not be null.null.public reactor.core.publisher.Mono<Long> count(String cypherQuery)
ReactiveNeo4jOperationscount in interface ReactiveNeo4jOperationscypherQuery - the Cypher query that returns the count.null.public reactor.core.publisher.Mono<Long> count(String cypherQuery, Map<String,Object> parameters)
ReactiveNeo4jOperationscount in interface ReactiveNeo4jOperationscypherQuery - the Cypher query that returns the count.parameters - Map of parameters. Must not be null.null.public <T> reactor.core.publisher.Flux<T> findAll(Class<T> domainType)
ReactiveNeo4jOperationsfindAll in interface ReactiveNeo4jOperationsT - the type of the entities. Must not be null.domainType - the type of the entities. Must not be null.null.public <T> reactor.core.publisher.Flux<T> findAll(org.neo4j.cypherdsl.core.Statement statement,
Class<T> domainType)
ReactiveNeo4jOperationsfindAll in interface ReactiveNeo4jOperationsT - the type of the entities. Must not be null.statement - Cypher Statement. Must not be null.domainType - the type of the entities. Must not be null.null.public <T> reactor.core.publisher.Flux<T> findAll(org.neo4j.cypherdsl.core.Statement statement,
Map<String,Object> parameters,
Class<T> domainType)
ReactiveNeo4jOperationsfindAll in interface ReactiveNeo4jOperationsT - the type of the entities. Must not be null.statement - Cypher Statement. Must not be null.parameters - Map of parameters. Must not be null.domainType - the type of the entities. Must not be null.null.public <T> reactor.core.publisher.Mono<T> findOne(org.neo4j.cypherdsl.core.Statement statement,
Map<String,Object> parameters,
Class<T> domainType)
ReactiveNeo4jOperationsfindOne in interface ReactiveNeo4jOperationsT - the type of the entities. Must not be null.statement - Cypher Statement. Must not be null.parameters - Map of parameters. Must not be null.domainType - the type of the entities. Must not be null.null.public <T> reactor.core.publisher.Flux<T> findAll(String cypherQuery, Class<T> domainType)
ReactiveNeo4jOperationsfindAll in interface ReactiveNeo4jOperationsT - the type of the entities. Must not be null.cypherQuery - Cypher query string. Must not be null.domainType - the type of the entities. Must not be null.null.public <T> reactor.core.publisher.Flux<T> findAll(String cypherQuery, Map<String,Object> parameters, Class<T> domainType)
ReactiveNeo4jOperationsfindAll in interface ReactiveNeo4jOperationsT - the type of the entities. Must not be null.cypherQuery - Cypher query string. Must not be null.parameters - Map of parameters. Must not be null.domainType - the type of the entities. Must not be null.null.public <T> reactor.core.publisher.Mono<T> findOne(String cypherQuery, Map<String,Object> parameters, Class<T> domainType)
ReactiveNeo4jOperationsfindOne in interface ReactiveNeo4jOperationsT - the type of the entities. Must not be null.cypherQuery - Cypher query string. Must not be null.parameters - Map of parameters. Must not be null.domainType - the type of the entities. Must not be null.null.public <T> ReactiveFluentFindOperation.ExecutableFind<T> find(Class<T> domainType)
ReactiveFluentFindOperationfind in interface ReactiveFluentFindOperationdomainType - must not be null.ReactiveFluentFindOperation.ExecutableFind.public <T> reactor.core.publisher.Mono<T> findById(Object id, Class<T> domainType)
ReactiveNeo4jOperationsfindById in interface ReactiveNeo4jOperationsT - the type of the entity.id - the id of the entity to load. Must not be null.domainType - the type of the entity. Must not be null.public <T> reactor.core.publisher.Flux<T> findAllById(Iterable<?> ids, Class<T> domainType)
ReactiveNeo4jOperationsfindAllById in interface ReactiveNeo4jOperationsT - the type of the entities. Must not be null.ids - of the entities identifying the entities to load. Must not be null.domainType - the type of the entities. Must not be null.null.public <T> reactor.core.publisher.Mono<ReactiveNeo4jOperations.ExecutableQuery<T>> toExecutableQuery(Class<T> domainType, QueryFragmentsAndParameters queryFragmentsAndParameters)
ReactiveNeo4jOperationstoExecutableQuery in interface ReactiveNeo4jOperationsT - The type of the objects returned by this query.domainType - domain class the executable query should returnqueryFragmentsAndParameters - fragments and parameters to construct the query frompublic <T> reactor.core.publisher.Mono<T> save(T instance)
ReactiveNeo4jOperationssave in interface ReactiveNeo4jOperationsT - the type of the entity.instance - the entity to be saved. Must not be null.public <T,R> reactor.core.publisher.Mono<R> saveAs(T instance,
Class<R> resultType)
ReactiveNeo4jOperationsresultType.saveAs in interface ReactiveNeo4jOperationsT - the type of the entity.R - the type of the projection to be used during save.instance - the entity to be saved. Must not be null.public <T> reactor.core.publisher.Flux<T> saveAll(Iterable<T> instances)
ReactiveNeo4jOperationssaveAll in interface ReactiveNeo4jOperationsT - the type of the entity.instances - the instances to be saved. Must not be null.public <T,R> reactor.core.publisher.Flux<R> saveAllAs(Iterable<T> instances, Class<R> resultType)
ReactiveNeo4jOperationsresultType.saveAllAs in interface ReactiveNeo4jOperationsT - the type of the entity.R - the type of the projection to be used during save.instances - the instances to be saved. Must not be null.public <T> reactor.core.publisher.Mono<Void> deleteAllById(Iterable<?> ids, Class<T> domainType)
ReactiveNeo4jOperationsdeleteAllById in interface ReactiveNeo4jOperationsT - the type of the entity.ids - the ids of the entities to be deleted. Must not be null.domainType - the type of the entitypublic <T> reactor.core.publisher.Mono<Void> deleteById(Object id, Class<T> domainType)
ReactiveNeo4jOperationsdeleteById in interface ReactiveNeo4jOperationsT - the type of the entity.id - the id of the entity to be deleted. Must not be null.domainType - the type of the entitypublic <T> reactor.core.publisher.Mono<Void> deleteByIdWithVersion(Object id, Class<T> domainType, Neo4jPersistentProperty versionProperty, Object versionValue)
deleteByIdWithVersion in interface ReactiveNeo4jOperationspublic reactor.core.publisher.Mono<Void> deleteAll(Class<?> domainType)
ReactiveNeo4jOperationsdeleteAll in interface ReactiveNeo4jOperationsdomainType - type of the entities to be deleted. Must not be null.public <T> reactor.core.publisher.Mono<ReactiveNeo4jOperations.ExecutableQuery<T>> toExecutableQuery(PreparedQuery<T> preparedQuery)
ReactiveNeo4jOperationstoExecutableQuery in interface ReactiveNeo4jOperationsT - The type of the objects returned by this query.preparedQuery - prepared query that should get converted to an executable querypublic void setBeanFactory(BeanFactory beanFactory) throws BeansException
setBeanFactory in interface BeanFactoryAwareBeansExceptionpublic void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic <T> ReactiveFluentSaveOperation.ExecutableSave<T> save(Class<T> domainType)
ReactiveFluentSaveOperationsave in interface ReactiveFluentSaveOperationdomainType - must not be null.ReactiveFluentSaveOperation.ExecutableSave.Copyright © 2019–2021 Neo4j, Neo4j Sweden AB. All rights reserved.