Package dev.voidframework.persistence
Class AbstractTransactionalInterceptor
java.lang.Object
dev.voidframework.persistence.AbstractTransactionalInterceptor
- All Implemented Interfaces:
org.aopalliance.aop.Advice,org.aopalliance.intercept.Interceptor,org.aopalliance.intercept.MethodInterceptor
public abstract class AbstractTransactionalInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor
Provides base methods for all transactional interceptors.
- Since:
- 1.4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanhasToRollback(jakarta.transaction.Transactional transactionalAnnotation, Class<?> throwableClass) Determines whether a rollback should be performed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aopalliance.intercept.MethodInterceptor
invoke
-
Constructor Details
-
AbstractTransactionalInterceptor
public AbstractTransactionalInterceptor()
-
-
Method Details
-
hasToRollback
protected boolean hasToRollback(jakarta.transaction.Transactional transactionalAnnotation, Class<?> throwableClass) Determines whether a rollback should be performed.- Parameters:
transactionalAnnotation- The current transaction annotationthrowableClass- The caught throwable class- Returns:
trueif a rollback should be performed, otherwisefalse- Since:
- 1.4.0
-