Class HibernateConnectionConnectionOperations
java.lang.Object
io.micronaut.data.hibernate.connection.HibernateConnectionConnectionOperations
- All Implemented Interfaces:
- ConnectionOperations<Connection>
@Order(200)
@Internal
@RequiresSyncHibernate
@EachBean(HibernateConnectionOperations.class)
@Replaces(DefaultDataSourceConnectionOperations.class)
public final class HibernateConnectionConnectionOperations
extends Object
implements ConnectionOperations<Connection>
The connection operations that extract 
Connection from Hibernate Session.- Since:
- 4.0.0
- Author:
- Denis Stepanov
- 
Constructor SummaryConstructorsConstructorDescriptionHibernateConnectionConnectionOperations(HibernateConnectionOperations hibernateConnectionOperations) 
- 
Method SummaryModifier and TypeMethodDescription<R> Rexecute(ConnectionDefinition definition, Function<ConnectionStatus<Connection>, R> callback) Execute a connection within the context of the function.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
- 
Constructor Details- 
HibernateConnectionConnectionOperationspublic HibernateConnectionConnectionOperations(HibernateConnectionOperations hibernateConnectionOperations) 
 
- 
- 
Method Details- 
findConnectionStatusDescription copied from interface:ConnectionOperationsObtains the current connection.- Specified by:
- findConnectionStatusin interface- ConnectionOperations<Connection>
- Returns:
- The optional connection
 
- 
executepublic <R> R execute(ConnectionDefinition definition, Function<ConnectionStatus<Connection>, R> callback) Description copied from interface:ConnectionOperationsExecute a connection within the context of the function.- Specified by:
- executein interface- ConnectionOperations<Connection>
- Type Parameters:
- R- The result
- Parameters:
- definition- The connection definition
- callback- The call back
- Returns:
- The result
 
 
-