public class MockSessionUtils extends Object implements SessionUtils
Constructor and Description |
---|
MockSessionUtils() |
Modifier and Type | Method and Description |
---|---|
<V> V |
withManualFlush(java.util.function.Supplier<V> supplier)
Converts the flush mode for the current session factory to MANUAL
for the duration of the call to the given supplier.
|
<V> V |
withReadOnlyTransaction(java.util.function.Supplier<V> supplier)
Invokes the given supplier within the context of a read-only transaction.
|
<V> V |
withTransaction(java.util.function.Supplier<V> supplier)
Invoked the given supplier within the context of a transaction.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
withManualFlush, withReadOnlyTransaction, withTransaction
public <V> V withTransaction(java.util.function.Supplier<V> supplier)
SessionUtils
withTransaction
in interface SessionUtils
V
- type returned by the suppliersupplier
- supplier to invokepublic <V> V withReadOnlyTransaction(java.util.function.Supplier<V> supplier)
SessionUtils
withReadOnlyTransaction
in interface SessionUtils
V
- type returned by the suppliersupplier
- supplier to invokepublic <V> V withManualFlush(java.util.function.Supplier<V> supplier)
SessionUtils
withManualFlush
in interface SessionUtils
V
- type returned by the suppliersupplier
- supplier to invokeCopyright © 2021. All rights reserved.