org.apache.ibatis.session
Class SqlSessionManager

java.lang.Object
  extended by org.apache.ibatis.session.SqlSessionManager
All Implemented Interfaces:
SqlSession, SqlSessionFactory

public class SqlSessionManager
extends Object
implements SqlSessionFactory, SqlSession


Method Summary
 void clearCache()
           
 void close()
           
 void commit()
           
 void commit(boolean force)
           
 int delete(String statement)
           
 int delete(String statement, Object parameter)
           
 Configuration getConfiguration()
           
 Connection getConnection()
           
<T> T
getMapper(Class<T> type)
           
 int insert(String statement)
           
 int insert(String statement, Object parameter)
           
 boolean isManagedSessionStarted()
           
static SqlSessionManager newInstance(InputStream inputStream)
           
static SqlSessionManager newInstance(InputStream inputStream, Properties properties)
           
static SqlSessionManager newInstance(InputStream inputStream, String environment)
           
static SqlSessionManager newInstance(Reader reader)
           
static SqlSessionManager newInstance(Reader reader, Properties properties)
           
static SqlSessionManager newInstance(Reader reader, String environment)
           
static SqlSessionManager newInstance(SqlSessionFactory sqlSessionFactory)
           
 SqlSession openSession()
           
 SqlSession openSession(boolean autoCommit)
           
 SqlSession openSession(Connection connection)
           
 SqlSession openSession(ExecutorType execType)
           
 SqlSession openSession(ExecutorType execType, boolean autoCommit)
           
 SqlSession openSession(ExecutorType execType, Connection connection)
           
 SqlSession openSession(ExecutorType execType, TransactionIsolationLevel level)
           
 SqlSession openSession(TransactionIsolationLevel level)
           
 void rollback()
           
 void rollback(boolean force)
           
 void select(String statement, Object parameter, ResultHandler handler)
           
 void select(String statement, Object parameter, RowBounds rowBounds, ResultHandler handler)
           
 void select(String statement, ResultHandler handler)
           
 List selectList(String statement)
           
 List selectList(String statement, Object parameter)
           
 List selectList(String statement, Object parameter, RowBounds rowBounds)
           
 Map selectMap(String statement, Object parameter, String mapKey)
           
 Map selectMap(String statement, Object parameter, String mapKey, RowBounds rowBounds)
           
 Map selectMap(String statement, String mapKey)
           
 Object selectOne(String statement)
           
 Object selectOne(String statement, Object parameter)
           
 void startManagedSession()
           
 void startManagedSession(boolean autoCommit)
           
 void startManagedSession(Connection connection)
           
 void startManagedSession(ExecutorType execType)
           
 void startManagedSession(ExecutorType execType, boolean autoCommit)
           
 void startManagedSession(ExecutorType execType, Connection connection)
           
 void startManagedSession(ExecutorType execType, TransactionIsolationLevel level)
           
 void startManagedSession(TransactionIsolationLevel level)
           
 int update(String statement)
           
 int update(String statement, Object parameter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static SqlSessionManager newInstance(Reader reader)

newInstance

public static SqlSessionManager newInstance(Reader reader,
                                            String environment)

newInstance

public static SqlSessionManager newInstance(Reader reader,
                                            Properties properties)

newInstance

public static SqlSessionManager newInstance(InputStream inputStream)

newInstance

public static SqlSessionManager newInstance(InputStream inputStream,
                                            String environment)

newInstance

public static SqlSessionManager newInstance(InputStream inputStream,
                                            Properties properties)

newInstance

public static SqlSessionManager newInstance(SqlSessionFactory sqlSessionFactory)

startManagedSession

public void startManagedSession()

startManagedSession

public void startManagedSession(boolean autoCommit)

startManagedSession

public void startManagedSession(Connection connection)

startManagedSession

public void startManagedSession(TransactionIsolationLevel level)

startManagedSession

public void startManagedSession(ExecutorType execType)

startManagedSession

public void startManagedSession(ExecutorType execType,
                                boolean autoCommit)

startManagedSession

public void startManagedSession(ExecutorType execType,
                                TransactionIsolationLevel level)

startManagedSession

public void startManagedSession(ExecutorType execType,
                                Connection connection)

isManagedSessionStarted

public boolean isManagedSessionStarted()

openSession

public SqlSession openSession()
Specified by:
openSession in interface SqlSessionFactory

openSession

public SqlSession openSession(boolean autoCommit)
Specified by:
openSession in interface SqlSessionFactory

openSession

public SqlSession openSession(Connection connection)
Specified by:
openSession in interface SqlSessionFactory

openSession

public SqlSession openSession(TransactionIsolationLevel level)
Specified by:
openSession in interface SqlSessionFactory

openSession

public SqlSession openSession(ExecutorType execType)
Specified by:
openSession in interface SqlSessionFactory

openSession

public SqlSession openSession(ExecutorType execType,
                              boolean autoCommit)
Specified by:
openSession in interface SqlSessionFactory

openSession

public SqlSession openSession(ExecutorType execType,
                              TransactionIsolationLevel level)
Specified by:
openSession in interface SqlSessionFactory

openSession

public SqlSession openSession(ExecutorType execType,
                              Connection connection)
Specified by:
openSession in interface SqlSessionFactory

getConfiguration

public Configuration getConfiguration()
Specified by:
getConfiguration in interface SqlSession
Specified by:
getConfiguration in interface SqlSessionFactory

selectOne

public Object selectOne(String statement)
Specified by:
selectOne in interface SqlSession

selectOne

public Object selectOne(String statement,
                        Object parameter)
Specified by:
selectOne in interface SqlSession

selectMap

public Map selectMap(String statement,
                     String mapKey)
Specified by:
selectMap in interface SqlSession

selectMap

public Map selectMap(String statement,
                     Object parameter,
                     String mapKey)
Specified by:
selectMap in interface SqlSession

selectMap

public Map selectMap(String statement,
                     Object parameter,
                     String mapKey,
                     RowBounds rowBounds)
Specified by:
selectMap in interface SqlSession

selectList

public List selectList(String statement)
Specified by:
selectList in interface SqlSession

selectList

public List selectList(String statement,
                       Object parameter)
Specified by:
selectList in interface SqlSession

selectList

public List selectList(String statement,
                       Object parameter,
                       RowBounds rowBounds)
Specified by:
selectList in interface SqlSession

select

public void select(String statement,
                   ResultHandler handler)
Specified by:
select in interface SqlSession

select

public void select(String statement,
                   Object parameter,
                   ResultHandler handler)
Specified by:
select in interface SqlSession

select

public void select(String statement,
                   Object parameter,
                   RowBounds rowBounds,
                   ResultHandler handler)
Specified by:
select in interface SqlSession

insert

public int insert(String statement)
Specified by:
insert in interface SqlSession

insert

public int insert(String statement,
                  Object parameter)
Specified by:
insert in interface SqlSession

update

public int update(String statement)
Specified by:
update in interface SqlSession

update

public int update(String statement,
                  Object parameter)
Specified by:
update in interface SqlSession

delete

public int delete(String statement)
Specified by:
delete in interface SqlSession

delete

public int delete(String statement,
                  Object parameter)
Specified by:
delete in interface SqlSession

getMapper

public <T> T getMapper(Class<T> type)
Specified by:
getMapper in interface SqlSession

getConnection

public Connection getConnection()
Specified by:
getConnection in interface SqlSession

clearCache

public void clearCache()
Specified by:
clearCache in interface SqlSession

commit

public void commit()
Specified by:
commit in interface SqlSession

commit

public void commit(boolean force)
Specified by:
commit in interface SqlSession

rollback

public void rollback()
Specified by:
rollback in interface SqlSession

rollback

public void rollback(boolean force)
Specified by:
rollback in interface SqlSession

close

public void close()
Specified by:
close in interface SqlSession


Copyright © 2010-2011 MyBatis.org. All Rights Reserved.