Interface HibernateReactorRepositoryOperations
- All Superinterfaces:
io.micronaut.core.convert.ConversionServiceProvider
,ReactiveRepositoryOperations
,ReactiveTransactionOperations<org.hibernate.reactive.stage.Stage.Session>
,ReactorReactiveRepositoryOperations
,ReactorReactiveTransactionOperations<org.hibernate.reactive.stage.Stage.Session>
public interface HibernateReactorRepositoryOperations
extends ReactorReactiveRepositoryOperations, ReactorReactiveTransactionOperations<org.hibernate.reactive.stage.Stage.Session>
Hibernate reactive repository operations.
This interface is experimental might change in the future.
- Since:
- 3.5.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.transaction.reactive.ReactiveTransactionOperations
ReactiveTransactionOperations.TransactionalCallback<C,
T> -
Field Summary
Fields inherited from interface io.micronaut.transaction.reactive.ReactorReactiveTransactionOperations
TRANSACTION_DEFINITION_KEY_PREFIX, TRANSACTION_STATUS_KEY_PREFIX
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
flush()
Flush the current session.jakarta.persistence.criteria.CriteriaBuilder
reactor.core.publisher.Mono<Void>
persistAndFlush
(Object entity) Persist and flush the entity.<T> reactor.core.publisher.Mono<T>
withSession
(Function<org.hibernate.reactive.stage.Stage.Session, reactor.core.publisher.Mono<T>> work) Execute with a new or existing session.<T> reactor.core.publisher.Flux<T>
withSessionFlux
(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
Methods inherited from interface io.micronaut.transaction.reactive.ReactorReactiveTransactionOperations
getTransactionDefinition, getTransactionStatus, withTransaction, withTransaction, withTransactionFlux, withTransactionFlux, withTransactionMono, withTransactionMono
-
Method Details
-
withSession
@NonNull <T> 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.- Type Parameters:
T
- The published item- Parameters:
work
- The work- Returns:
- The produced result publisher
-
withSessionFlux
@NonNull <T> 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.- Type Parameters:
T
- The published item- Parameters:
work
- The work- Returns:
- The produced result publisher
-
persistAndFlush
Persist and flush the entity.- Parameters:
entity
- The entity- Returns:
- The operation publisher
-
flush
Flush the current session.- Returns:
- The operation publisher
-
getCriteriaBuilder
@NonNull jakarta.persistence.criteria.CriteriaBuilder getCriteriaBuilder()- Returns:
CriteriaBuilder
that can be used to work with criteria.
-