Package org.hibernate.reactive.stage
Interface Stage
public interface Stage
An API for Hibernate Reactive where non-blocking operations are
represented by a Java
CompletionStage.
The Stage.Query, Stage.Session, and Stage.SessionFactory
interfaces declared here are simply non-blocking counterparts to
the similarly-named interfaces in Hibernate ORM.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA non-blocking counterpart to the HibernateQueryinterface, allowing reactive execution of HQL and JPQL queries.static interfaceAn object whoseStage.Closeable.close()method returns aCompletionStage.static interfacestatic interfacestatic interfaceOperations common to objects which act as factories for instances ofStage.Query.static interfacestatic interfaceA non-blocking counterpart to the HibernateSessioninterface, allowing a reactive style of interaction with the database.static interfaceFactory forreactive sessions.static interfaceA non-blocking counterpart to the HibernateStatelessSessioninterface, which provides a command-oriented API for performing bulk operations against a database.static interfaceAllows code withinStage.Session.withTransaction(Function)to mark a transaction for rollback. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T> CompletionStage<T>fetch(T association) Asynchronously fetch an association that's configured for lazy loading.
-
Method Details
-
fetch
Asynchronously fetch an association that's configured for lazy loading.Stage.fetch(author.getBook()).thenAccept(book -> print(book.getTitle()));- Parameters:
association- a lazy-loaded association- Returns:
- the fetched association, via a
CompletionStage - See Also:
-