com.ibatis.sqlmap.engine.impl

Class SqlMapSessionImpl

public class SqlMapSessionImpl extends Object implements SqlMapSession

Implementation of SqlMapSession
Field Summary
protected booleanclosed
protected SqlMapExecutorDelegatedelegate
protected SessionScopesessionScope
Constructor Summary
SqlMapSessionImpl(SqlMapClientImpl client)
Constructor
Method Summary
voidclose()
voidcommitTransaction()
intdelete(String id, Object param)
intdelete(String id)
voidendTransaction()
intexecuteBatch()
ListexecuteBatchDetailed()
ConnectiongetCurrentConnection()
DataSourcegetDataSource()
SqlMapExecutorDelegategetDelegate()
Get the delegate
MappedStatementgetMappedStatement(String id)
Gets a mapped statement by ID
SqlExecutorgetSqlExecutor()
Get the SQL executor
ConnectiongetUserConnection()
TODO Deprecated
Objectinsert(String id, Object param)
Objectinsert(String id)
booleanisClosed()
Getter to tell if the session is still open
booleanisEnhancementEnabled()
Get the status of CGLib enhancements
booleanisLazyLoadingEnabled()
Get the status of lazy loading
voidopen()
Start the session
ListqueryForList(String id, Object paramObject)
ListqueryForList(String id)
ListqueryForList(String id, Object paramObject, int skip, int max)
ListqueryForList(String id, int skip, int max)
MapqueryForMap(String id, Object paramObject, String keyProp)
MapqueryForMap(String id, Object paramObject, String keyProp, String valueProp)
ObjectqueryForObject(String id, Object paramObject)
ObjectqueryForObject(String id)
ObjectqueryForObject(String id, Object paramObject, Object resultObject)
PaginatedListqueryForPaginatedList(String id, Object paramObject, int pageSize)
PaginatedListqueryForPaginatedList(String id, int pageSize)
voidqueryWithRowHandler(String id, Object paramObject, RowHandler rowHandler)
voidqueryWithRowHandler(String id, RowHandler rowHandler)
voidsetUserConnection(Connection connection)
voidstartBatch()
voidstartTransaction()
voidstartTransaction(int transactionIsolation)
intupdate(String id, Object param)
intupdate(String id)

Field Detail

closed

protected boolean closed

delegate

protected SqlMapExecutorDelegate delegate

sessionScope

protected SessionScope sessionScope

Constructor Detail

SqlMapSessionImpl

public SqlMapSessionImpl(SqlMapClientImpl client)
Constructor

Parameters: client - the client that will use the session

Method Detail

close

public void close()

commitTransaction

public void commitTransaction()

delete

public int delete(String id, Object param)

delete

public int delete(String id)

endTransaction

public void endTransaction()

executeBatch

public int executeBatch()

executeBatchDetailed

public List executeBatchDetailed()

getCurrentConnection

public Connection getCurrentConnection()

getDataSource

public DataSource getDataSource()

getDelegate

public SqlMapExecutorDelegate getDelegate()
Get the delegate

Returns: - the delegate

getMappedStatement

public MappedStatement getMappedStatement(String id)
Gets a mapped statement by ID

Parameters: id - the ID

Returns: - the mapped statement

getSqlExecutor

public SqlExecutor getSqlExecutor()
Get the SQL executor

Returns: - the executor

getUserConnection

public Connection getUserConnection()

Deprecated:

TODO Deprecated

Returns: Current connection

Throws: SQLException

insert

public Object insert(String id, Object param)

insert

public Object insert(String id)

isClosed

public boolean isClosed()
Getter to tell if the session is still open

Returns: - the status of the session

isEnhancementEnabled

public boolean isEnhancementEnabled()
Get the status of CGLib enhancements

Returns: - the status

isLazyLoadingEnabled

public boolean isLazyLoadingEnabled()
Get the status of lazy loading

Returns: - the status

open

public void open()
Start the session

queryForList

public List queryForList(String id, Object paramObject)

queryForList

public List queryForList(String id)

queryForList

public List queryForList(String id, Object paramObject, int skip, int max)

queryForList

public List queryForList(String id, int skip, int max)

queryForMap

public Map queryForMap(String id, Object paramObject, String keyProp)

queryForMap

public Map queryForMap(String id, Object paramObject, String keyProp, String valueProp)

queryForObject

public Object queryForObject(String id, Object paramObject)

queryForObject

public Object queryForObject(String id)

queryForObject

public Object queryForObject(String id, Object paramObject, Object resultObject)

queryForPaginatedList

public PaginatedList queryForPaginatedList(String id, Object paramObject, int pageSize)

Deprecated: All paginated list features have been deprecated

queryForPaginatedList

public PaginatedList queryForPaginatedList(String id, int pageSize)

Deprecated: All paginated list features have been deprecated

queryWithRowHandler

public void queryWithRowHandler(String id, Object paramObject, RowHandler rowHandler)

queryWithRowHandler

public void queryWithRowHandler(String id, RowHandler rowHandler)

setUserConnection

public void setUserConnection(Connection connection)

startBatch

public void startBatch()

startTransaction

public void startTransaction()

startTransaction

public void startTransaction(int transactionIsolation)

update

public int update(String id, Object param)

update

public int update(String id)
Copyright © 2011. All Rights Reserved.