public class DefaultMybatisHandler extends Object implements MybatisHandler
Constructor and Description |
---|
DefaultMybatisHandler(MybatisFactory mybatisFactory,
MybatisStorage mybatisStorage) |
Modifier and Type | Method and Description |
---|---|
void |
closeSqlSession() |
void |
closeSqlSession(String sessionFactoryName) |
protected org.apache.ibatis.session.SqlSession |
openSession(String sessionFactoryName,
org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory) |
<R> R |
withSqlSession(MybatisCallback<R> callback) |
<R> R |
withSqlSession(String sessionFactoryName,
MybatisCallback<R> callback) |
@Inject public DefaultMybatisHandler(@Nonnull MybatisFactory mybatisFactory, @Nonnull MybatisStorage mybatisStorage)
@Nullable public <R> R withSqlSession(@Nonnull MybatisCallback<R> callback) throws RuntimeMybatisException
withSqlSession
in interface MybatisHandler
RuntimeMybatisException
@Nullable public <R> R withSqlSession(@Nonnull String sessionFactoryName, @Nonnull MybatisCallback<R> callback) throws RuntimeMybatisException
withSqlSession
in interface MybatisHandler
RuntimeMybatisException
public void closeSqlSession()
closeSqlSession
in interface MybatisHandler
public void closeSqlSession(@Nonnull String sessionFactoryName)
closeSqlSession
in interface MybatisHandler