io.quarkiverse.mybatis.deployment.SqlSessionManagerBuildItem Maven / Gradle / Ivy
package io.quarkiverse.mybatis.deployment;
import io.quarkiverse.mybatis.runtime.TransactionalSqlSession;
import io.quarkus.builder.item.MultiBuildItem;
import io.quarkus.runtime.RuntimeValue;
/**
* Hold the RuntimeValue of {@link TransactionalSqlSession}
*/
public final class SqlSessionManagerBuildItem extends MultiBuildItem {
private final RuntimeValue sqlSessionManager;
private final String dataSourceName;
private final boolean defaultDataSource;
public SqlSessionManagerBuildItem(
RuntimeValue sqlSessionManager,
String dataSourceName,
Boolean defaultDataSource) {
this.sqlSessionManager = sqlSessionManager;
this.dataSourceName = dataSourceName;
this.defaultDataSource = defaultDataSource;
}
public RuntimeValue getSqlSessionManager() {
return sqlSessionManager;
}
public String getDataSourceName() {
return dataSourceName;
}
public boolean isDefaultDataSource() {
return defaultDataSource;
}
}