org.babyfish.jimmer.spring.transaction.JTransactionalSqlClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-spring-boot-starter Show documentation
Show all versions of jimmer-spring-boot-starter Show documentation
A revolutionary ORM framework for both java and kotlin
package org.babyfish.jimmer.spring.transaction;
import org.babyfish.jimmer.sql.JSqlClient;
import org.babyfish.jimmer.sql.di.AbstractJSqlClientDelegate;
import org.babyfish.jimmer.sql.runtime.*;
class JTransactionalSqlClient extends AbstractJSqlClientDelegate {
@Override
protected JSqlClientImplementor sqlClient() {
JSqlClient sqlClient = JimmerTransactionManager.sqlClient();
if (sqlClient == null) {
throw new IllegalStateException(
"The transactional sql client is used, " +
"however, there is no AOP transaction, or the transaction manager is not \"" +
JimmerTransactionManager.class.getName() +
"\""
);
}
return (JSqlClientImplementor) sqlClient;
}
}