Class SpringHibernateConnectionOperations
java.lang.Object
io.micronaut.data.spring.jpa.hibernate.SpringHibernateConnectionOperations
- All Implemented Interfaces:
- ConnectionOperations<org.hibernate.Session>
@Internal
@EachBean(org.hibernate.SessionFactory.class)
@Replaces(HibernateConnectionOperations.class)
public final class SpringHibernateConnectionOperations
extends Object
implements ConnectionOperations<org.hibernate.Session>
Spring JDBC Hibernate Session operations.
- Since:
- 4.0.0
- Author:
- Denis Stepanov
- 
Method SummaryModifier and TypeMethodDescription<R> Rexecute(ConnectionDefinition definition, Function<ConnectionStatus<org.hibernate.Session>, R> callback) Execute a connection within the context of the function.Optional<ConnectionStatus<org.hibernate.Session>>Obtains the current connection.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.data.connection.ConnectionOperationsexecuteRead, executeWrite, getConnectionStatus
- 
Method Details- 
findConnectionStatusDescription copied from interface:ConnectionOperationsObtains the current connection.- Specified by:
- findConnectionStatusin interface- ConnectionOperations<org.hibernate.Session>
- Returns:
- The optional connection
 
- 
executepublic <R> R execute(ConnectionDefinition definition, Function<ConnectionStatus<org.hibernate.Session>, R> callback) Description copied from interface:ConnectionOperationsExecute a connection within the context of the function.- Specified by:
- executein interface- ConnectionOperations<org.hibernate.Session>
- Type Parameters:
- R- The result
- Parameters:
- definition- The connection definition
- callback- The call back
- Returns:
- The result
 
 
-