Enum Class SurroundingTransactionDetectorMethodInterceptor
java.lang.Object
java.lang.Enum<SurroundingTransactionDetectorMethodInterceptor>
org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor
- All Implemented Interfaces:
Serializable
,Comparable<SurroundingTransactionDetectorMethodInterceptor>
,Constable
,Advice
,Interceptor
,MethodInterceptor
public enum SurroundingTransactionDetectorMethodInterceptor
extends Enum<SurroundingTransactionDetectorMethodInterceptor>
implements MethodInterceptor
MethodInterceptor
detecting whether a transaction is already running and exposing that fact via
isSurroundingTransactionActive()
. Useful in case subsequent interceptors might create transactions
themselves but downstream components have to find out whether there was one running before the call entered the
proxy.- Since:
- 1.13
- Author:
- Oliver Gierke, Christoph Strobl
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptioninvoke
(MethodInvocation invocation) boolean
Returns whether a transaction was active before the method call entered the repository proxy.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isSurroundingTransactionActive
public boolean isSurroundingTransactionActive()Returns whether a transaction was active before the method call entered the repository proxy.- Returns:
-
invoke
- Specified by:
invoke
in interfaceMethodInterceptor
- Throws:
Throwable
-