Interface HibernateReactorRepositoryOperations
- All Superinterfaces:
io.micronaut.core.convert.ConversionServiceProvider
,ReactiveRepositoryOperations
,ReactorReactiveRepositoryOperations
Hibernate reactive repository operations.
This interface is experimental might change in the future.
- Since:
- 3.5.0
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescription@NonNull reactor.core.publisher.Mono<Void>
flush()
Flush the current session.@NonNull jakarta.persistence.criteria.CriteriaBuilder
@NonNull reactor.core.publisher.Mono<Void>
persistAndFlush
(@NonNull Object entity) Persist and flush the entity.<T> @NonNull reactor.core.publisher.Mono<T>
withSession
(@NonNull Function<org.hibernate.reactive.stage.Stage.Session, reactor.core.publisher.Mono<T>> work) Execute with a new or existing session.<T> @NonNull reactor.core.publisher.Flux<T>
withSessionFlux
(@NonNull Function<org.hibernate.reactive.stage.Stage.Session, reactor.core.publisher.Flux<T>> work) Execute with a new or existing session.Methods inherited from interface io.micronaut.core.convert.ConversionServiceProvider
getConversionService
Methods inherited from interface io.micronaut.data.operations.reactive.ReactorReactiveRepositoryOperations
count, delete, deleteAll, executeDelete, executeUpdate, exists, findAll, findAll, findOne, findOne, findOptional, findOptional, findPage, persist, persistAll, update, updateAll
-
Method Details
-
withSession
@NonNull <T> @NonNull reactor.core.publisher.Mono<T> withSession(@NonNull @NonNull Function<org.hibernate.reactive.stage.Stage.Session, reactor.core.publisher.Mono<T>> work) Execute with a new or existing session.- Type Parameters:
T
- The published item- Parameters:
work
- The work- Returns:
- The produced result publisher
-
withSessionFlux
@NonNull <T> @NonNull reactor.core.publisher.Flux<T> withSessionFlux(@NonNull @NonNull Function<org.hibernate.reactive.stage.Stage.Session, reactor.core.publisher.Flux<T>> work) Execute with a new or existing session.- Type Parameters:
T
- The published item- Parameters:
work
- The work- Returns:
- The produced result publisher
-
persistAndFlush
@NonNull @NonNull reactor.core.publisher.Mono<Void> persistAndFlush(@NonNull @NonNull Object entity) Persist and flush the entity.- Parameters:
entity
- The entity- Returns:
- The operation publisher
-
flush
Flush the current session.- Returns:
- The operation publisher
-
getCriteriaBuilder
@NonNull @NonNull jakarta.persistence.criteria.CriteriaBuilder getCriteriaBuilder()- Returns:
CriteriaBuilder
that can be used to work with criteria.
-