|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate
public class SqlMapExecutorDelegate
The workhorse that really runs the SQL
Field Summary | |
---|---|
protected SqlExecutor |
sqlExecutor
|
Constructor Summary | |
---|---|
SqlMapExecutorDelegate()
Default constructor |
Method Summary | |
---|---|
void |
addCacheModel(CacheModel model)
Add a cache model |
void |
addMappedStatement(MappedStatement ms)
Add a mapped statement |
void |
addParameterMap(ParameterMap map)
Add a parameter map |
void |
addResultMap(ResultMap map)
Add a result map |
protected void |
autoCommitTransaction(SessionScope sessionScope,
boolean autoStart)
|
protected void |
autoEndTransaction(SessionScope sessionScope,
boolean autoStart)
|
protected Transaction |
autoStartTransaction(SessionScope sessionScope,
boolean autoStart,
Transaction trans)
|
protected SessionScope |
beginSessionScope()
|
protected StatementScope |
beginStatementScope(SessionScope sessionScope,
MappedStatement mappedStatement)
|
void |
commitTransaction(SessionScope sessionScope)
Commit the transaction on a session |
int |
delete(SessionScope sessionScope,
String id,
Object param)
Execute a delete statement |
protected void |
endSessionScope(SessionScope sessionScope)
|
protected void |
endStatementScope(StatementScope statementScope)
|
void |
endTransaction(SessionScope sessionScope)
End the transaction on a session |
boolean |
equals(Object obj)
|
int |
executeBatch(SessionScope sessionScope)
Execute a batch for a session |
List |
executeBatchDetailed(SessionScope sessionScope)
Execute a batch for a session |
void |
flushDataCache()
Flush all of the data caches |
void |
flushDataCache(String id)
Flush a single cache by ID |
CacheModel |
getCacheModel(String id)
Get a cache model by ID |
Iterator |
getCacheModelNames()
Get an iterator of the cache models |
DataExchangeFactory |
getDataExchangeFactory()
Getter for the DataExchangeFactory |
DataSource |
getDataSource()
Get the DataSource for the session |
MappedStatement |
getMappedStatement(String id)
Get a mappedstatement by its ID |
Iterator |
getMappedStatementNames()
Get an iterator of the mapped statements |
int |
getMaxTransactions()
Deprecated. |
ParameterMap |
getParameterMap(String id)
Get a parameter map by ID |
Iterator |
getParameterMapNames()
Get an iterator of all of the parameter maps |
ResultMap |
getResultMap(String id)
Get a result map by ID |
Iterator |
getResultMapNames()
Get an iterator of the result maps |
ResultObjectFactory |
getResultObjectFactory()
|
SqlExecutor |
getSqlExecutor()
Getter for the SqlExecutor |
Transaction |
getTransaction(SessionScope sessionScope)
Get a transaction for the session |
TransactionManager |
getTxManager()
Getter for the transaction manager |
TypeHandlerFactory |
getTypeHandlerFactory()
Getter for the TypeHandlerFactory |
int |
hashCode()
|
Object |
insert(SessionScope sessionScope,
String id,
Object param)
Call an insert statement by ID |
boolean |
isCacheModelsEnabled()
Getter for the status of caching |
boolean |
isEnhancementEnabled()
Getter for the status of CGLib enhancements |
boolean |
isForceMultipleResultSetSupport()
|
boolean |
isLazyLoadingEnabled()
Getter for the status of lazy loading |
boolean |
isStatementCacheEnabled()
|
boolean |
isUseColumnLabel()
|
List |
queryForList(SessionScope sessionScope,
String id,
Object paramObject)
Execute a query for a list |
List |
queryForList(SessionScope sessionScope,
String id,
Object paramObject,
int skip,
int max)
Execute a query for a list |
Map |
queryForMap(SessionScope sessionScope,
String id,
Object paramObject,
String keyProp)
Execute a query for a map. |
Map |
queryForMap(SessionScope sessionScope,
String id,
Object paramObject,
String keyProp,
String valueProp)
Execute a query for a map. |
Object |
queryForObject(SessionScope sessionScope,
String id,
Object paramObject)
Execute a select for a single object |
Object |
queryForObject(SessionScope sessionScope,
String id,
Object paramObject,
Object resultObject)
Execute a select for a single object |
PaginatedList |
queryForPaginatedList(SessionScope sessionScope,
String id,
Object paramObject,
int pageSize)
Deprecated. All paginated list features have been deprecated |
void |
queryWithRowHandler(SessionScope sessionScope,
String id,
Object paramObject,
RowHandler rowHandler)
Execute a query with a row handler. |
void |
setCacheModelsEnabled(boolean cacheModelsEnabled)
Turn on or off caching |
void |
setCustomExecutor(String sqlExecutorClass)
|
void |
setEnhancementEnabled(boolean enhancementEnabled)
Turn on or off CGLib enhancements |
void |
setForceMultipleResultSetSupport(boolean forceMultipleResultSetSupport)
|
void |
setLazyLoadingEnabled(boolean lazyLoadingEnabled)
Turn on or off lazy loading |
void |
setResultObjectFactory(ResultObjectFactory resultObjectFactory)
|
void |
setStatementCacheEnabled(boolean statementCacheEnabled)
|
void |
setTxManager(TransactionManager txManager)
Setter for the transaction manager |
void |
setUseColumnLabel(boolean useColumnLabel)
|
void |
setUserProvidedTransaction(SessionScope sessionScope,
Connection userConnection)
Use a user-provided transaction for a session |
void |
startBatch(SessionScope sessionScope)
Start a batch for a session |
void |
startTransaction(SessionScope sessionScope)
Start a transaction on the session |
void |
startTransaction(SessionScope sessionScope,
int transactionIsolation)
Start a transaction on the session with the specified isolation level. |
int |
update(SessionScope sessionScope,
String id,
Object param)
Execute an update statement |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SqlExecutor sqlExecutor
Constructor Detail |
---|
public SqlMapExecutorDelegate()
Method Detail |
---|
public void setCustomExecutor(String sqlExecutorClass)
public int getMaxTransactions()
public DataExchangeFactory getDataExchangeFactory()
public TypeHandlerFactory getTypeHandlerFactory()
public boolean isLazyLoadingEnabled()
public void setLazyLoadingEnabled(boolean lazyLoadingEnabled)
lazyLoadingEnabled
- - the new state of cachingpublic boolean isCacheModelsEnabled()
public void setCacheModelsEnabled(boolean cacheModelsEnabled)
cacheModelsEnabled
- - the new state of cachingpublic boolean isEnhancementEnabled()
public void setEnhancementEnabled(boolean enhancementEnabled)
enhancementEnabled
- - the new statepublic boolean isUseColumnLabel()
public void setUseColumnLabel(boolean useColumnLabel)
public TransactionManager getTxManager()
public void setTxManager(TransactionManager txManager)
txManager
- - the transaction managerpublic void addMappedStatement(MappedStatement ms)
ms
- - the mapped statement to addpublic Iterator getMappedStatementNames()
public MappedStatement getMappedStatement(String id)
id
- - the statement ID
public void addCacheModel(CacheModel model)
model
- - the model to addpublic Iterator getCacheModelNames()
public CacheModel getCacheModel(String id)
id
- - the ID
public void addResultMap(ResultMap map)
map
- - the result map to addpublic Iterator getResultMapNames()
public ResultMap getResultMap(String id)
id
- - the ID
public void addParameterMap(ParameterMap map)
map
- - the map to addpublic Iterator getParameterMapNames()
public ParameterMap getParameterMap(String id)
id
- - the ID
public void flushDataCache()
public void flushDataCache(String id)
id
- - the IDpublic Object insert(SessionScope sessionScope, String id, Object param) throws SQLException
sessionScope
- - the sessionid
- - the statement IDparam
- - the parameter object
SQLException
- - if the insert failspublic int update(SessionScope sessionScope, String id, Object param) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparam
- - the parameter object
SQLException
- - if the update failspublic int delete(SessionScope sessionScope, String id, Object param) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparam
- - the parameter object
SQLException
- - if the delete failspublic Object queryForObject(SessionScope sessionScope, String id, Object paramObject) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparamObject
- - the parameter object
SQLException
- - if the query failspublic Object queryForObject(SessionScope sessionScope, String id, Object paramObject, Object resultObject) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparamObject
- - the parameter objectresultObject
- - the result object (if not supplied or null, a new object will be created)
SQLException
- - if the query failspublic List queryForList(SessionScope sessionScope, String id, Object paramObject) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparamObject
- - the parameter object
SQLException
- - if the query failspublic List queryForList(SessionScope sessionScope, String id, Object paramObject, int skip, int max) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparamObject
- - the parameter objectskip
- - the number of rows to skipmax
- - the maximum number of rows to return
SQLException
- - if the query failspublic void queryWithRowHandler(SessionScope sessionScope, String id, Object paramObject, RowHandler rowHandler) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparamObject
- - the parameter objectrowHandler
- - the row handler
SQLException
- - if the query failspublic PaginatedList queryForPaginatedList(SessionScope sessionScope, String id, Object paramObject, int pageSize) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparamObject
- - the parameter objectpageSize
- - the page size
SQLException
- - if the query failspublic Map queryForMap(SessionScope sessionScope, String id, Object paramObject, String keyProp) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparamObject
- - the parameter objectkeyProp
- - the key property (from the results for the map)
SQLException
- - if the query failspublic Map queryForMap(SessionScope sessionScope, String id, Object paramObject, String keyProp, String valueProp) throws SQLException
sessionScope
- - the session scopeid
- - the statement IDparamObject
- - the parameter objectkeyProp
- - the property for the map keyvalueProp
- - the property for the map data
SQLException
- - if the query failspublic void startTransaction(SessionScope sessionScope) throws SQLException
sessionScope
- - the session
SQLException
- - if the transaction could not be startedpublic void startTransaction(SessionScope sessionScope, int transactionIsolation) throws SQLException
sessionScope
- - the session
SQLException
- - if the transaction could not be startedpublic void commitTransaction(SessionScope sessionScope) throws SQLException
sessionScope
- - the session
SQLException
- - if the transaction could not be committedpublic void endTransaction(SessionScope sessionScope) throws SQLException
sessionScope
- - the session
SQLException
- - if the transaction could not be endedpublic void startBatch(SessionScope sessionScope)
sessionScope
- - the sessionpublic int executeBatch(SessionScope sessionScope) throws SQLException
sessionScope
- - the session
SQLException
- - if the batch failspublic List executeBatchDetailed(SessionScope sessionScope) throws SQLException, BatchException
sessionScope
- - the session
SQLException
- if a database access error occurs, or the drive
does not support batch statements
BatchException
- if the driver throws BatchUpdateExceptionpublic void setUserProvidedTransaction(SessionScope sessionScope, Connection userConnection)
sessionScope
- - the session scopeuserConnection
- - the user supplied connectionpublic DataSource getDataSource()
public SqlExecutor getSqlExecutor()
public Transaction getTransaction(SessionScope sessionScope)
sessionScope
- - the session
protected void autoEndTransaction(SessionScope sessionScope, boolean autoStart) throws SQLException
SQLException
protected void autoCommitTransaction(SessionScope sessionScope, boolean autoStart) throws SQLException
SQLException
protected Transaction autoStartTransaction(SessionScope sessionScope, boolean autoStart, Transaction trans) throws SQLException
SQLException
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
protected StatementScope beginStatementScope(SessionScope sessionScope, MappedStatement mappedStatement)
protected void endStatementScope(StatementScope statementScope)
protected SessionScope beginSessionScope()
protected void endSessionScope(SessionScope sessionScope)
public ResultObjectFactory getResultObjectFactory()
public void setResultObjectFactory(ResultObjectFactory resultObjectFactory)
public boolean isStatementCacheEnabled()
public void setStatementCacheEnabled(boolean statementCacheEnabled)
public boolean isForceMultipleResultSetSupport()
public void setForceMultipleResultSetSupport(boolean forceMultipleResultSetSupport)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |