Class DefaultSqlSessionFactory
- java.lang.Object
-
- org.apache.ibatis.session.defaults.DefaultSqlSessionFactory
-
- All Implemented Interfaces:
SqlSessionFactory
public class DefaultSqlSessionFactory extends java.lang.Object implements SqlSessionFactory
-
-
Field Summary
Fields Modifier and Type Field Description private Configuration
configuration
-
Constructor Summary
Constructors Constructor Description DefaultSqlSessionFactory(Configuration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
closeTransaction(Transaction tx)
Configuration
getConfiguration()
private TransactionFactory
getTransactionFactoryFromEnvironment(Environment environment)
SqlSession
openSession()
SqlSession
openSession(boolean autoCommit)
SqlSession
openSession(java.sql.Connection connection)
SqlSession
openSession(ExecutorType execType)
SqlSession
openSession(ExecutorType execType, boolean autoCommit)
SqlSession
openSession(ExecutorType execType, java.sql.Connection connection)
SqlSession
openSession(ExecutorType execType, TransactionIsolationLevel level)
SqlSession
openSession(TransactionIsolationLevel level)
private SqlSession
openSessionFromConnection(ExecutorType execType, java.sql.Connection connection)
private SqlSession
openSessionFromDataSource(ExecutorType execType, TransactionIsolationLevel level, boolean autoCommit)
-
-
-
Field Detail
-
configuration
private final Configuration configuration
-
-
Constructor Detail
-
DefaultSqlSessionFactory
public DefaultSqlSessionFactory(Configuration configuration)
-
-
Method Detail
-
openSession
public SqlSession openSession()
- Specified by:
openSession
in interfaceSqlSessionFactory
-
openSession
public SqlSession openSession(boolean autoCommit)
- Specified by:
openSession
in interfaceSqlSessionFactory
-
openSession
public SqlSession openSession(ExecutorType execType)
- Specified by:
openSession
in interfaceSqlSessionFactory
-
openSession
public SqlSession openSession(TransactionIsolationLevel level)
- Specified by:
openSession
in interfaceSqlSessionFactory
-
openSession
public SqlSession openSession(ExecutorType execType, TransactionIsolationLevel level)
- Specified by:
openSession
in interfaceSqlSessionFactory
-
openSession
public SqlSession openSession(ExecutorType execType, boolean autoCommit)
- Specified by:
openSession
in interfaceSqlSessionFactory
-
openSession
public SqlSession openSession(java.sql.Connection connection)
- Specified by:
openSession
in interfaceSqlSessionFactory
-
openSession
public SqlSession openSession(ExecutorType execType, java.sql.Connection connection)
- Specified by:
openSession
in interfaceSqlSessionFactory
-
getConfiguration
public Configuration getConfiguration()
- Specified by:
getConfiguration
in interfaceSqlSessionFactory
-
openSessionFromDataSource
private SqlSession openSessionFromDataSource(ExecutorType execType, TransactionIsolationLevel level, boolean autoCommit)
-
openSessionFromConnection
private SqlSession openSessionFromConnection(ExecutorType execType, java.sql.Connection connection)
-
getTransactionFactoryFromEnvironment
private TransactionFactory getTransactionFactoryFromEnvironment(Environment environment)
-
closeTransaction
private void closeTransaction(Transaction tx)
-
-