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

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

There is a newer version: 2.2.4
Show newest version
package io.quarkiverse.mybatis.deployment;

import org.apache.ibatis.session.SqlSessionFactory;

import io.quarkus.builder.item.MultiBuildItem;
import io.quarkus.runtime.RuntimeValue;

/**
 * Hold the RuntimeValue of {@link SqlSessionFactory}
 */
public final class SqlSessionFactoryBuildItem extends MultiBuildItem {
    private final RuntimeValue sqlSessionFactory;
    private final String dataSourceName;
    private final boolean defaultDataSource;
    private final boolean fromXmlConfig;

    public SqlSessionFactoryBuildItem(
            RuntimeValue sqlSessionFactory,
            String dataSourceName,
            boolean isDefaultDataSource,
            boolean isFromXmlConfig) {
        this.sqlSessionFactory = sqlSessionFactory;
        this.dataSourceName = dataSourceName;
        this.defaultDataSource = isDefaultDataSource;
        this.fromXmlConfig = isFromXmlConfig;
    }

    public RuntimeValue getSqlSessionFactory() {
        return sqlSessionFactory;
    }

    public String getDataSourceName() {
        return dataSourceName;
    }

    public boolean isDefaultDataSource() {
        return defaultDataSource;
    }

    public boolean isFromXmlConfig() {
        return fromXmlConfig;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy