All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkiverse.mybatis.deployment.SqlSessionManagerBuildItem Maven / Gradle / Ivy

There is a newer version: 2.2.4
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy