|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate
The workhorse that really runs the SQL
| Field Summary | |
static int |
DEFAULT_MAX_REQUESTS
The default maximum number of requests |
static int |
DEFAULT_MAX_SESSIONS
The default maximum number of sessions |
static int |
DEFAULT_MAX_TRANSACTIONS
The default maximum number of transactions |
| 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 |
void |
commitTransaction(SessionScope session)
Commit the transaction on a session |
int |
delete(SessionScope session,
java.lang.String id,
java.lang.Object param)
Execute a delete statement |
void |
endTransaction(SessionScope session)
End the transaction on a session |
boolean |
equals(java.lang.Object obj)
|
int |
executeBatch(SessionScope session)
Execute a batch for a session |
void |
flushDataCache()
Flush all of the data caches |
void |
flushDataCache(java.lang.String id)
Flush a single cache by ID |
CacheModel |
getCacheModel(java.lang.String id)
Get a cache model by ID |
java.util.Iterator |
getCacheModelNames()
Get an iterator of the cache models |
DataExchangeFactory |
getDataExchangeFactory()
Getter for the DataExchangeFactory |
javax.sql.DataSource |
getDataSource()
Get the DataSource for the session |
MappedStatement |
getMappedStatement(java.lang.String id)
Get a mappedstatement by its ID |
java.util.Iterator |
getMappedStatementNames()
Get an iterator of the mapped statements |
int |
getMaxRequests()
Getter for the maximum number of requests |
int |
getMaxSessions()
Getter for the maximum number of sessions |
int |
getMaxTransactions()
Getter for the the maximum number of transactions |
ParameterMap |
getParameterMap(java.lang.String id)
Get a parameter map by ID |
java.util.Iterator |
getParameterMapNames()
Get an iterator of all of the parameter maps |
ResultMap |
getResultMap(java.lang.String id)
Get a result map by ID |
java.util.Iterator |
getResultMapNames()
Get an iterator of the result maps |
SqlExecutor |
getSqlExecutor()
Getter for the SqlExecutor |
Transaction |
getTransaction(SessionScope session)
Get a transaction for the session |
TransactionManager |
getTxManager()
Getter for the transaction manager |
TypeHandlerFactory |
getTypeHandlerFactory()
Getter for the TypeHandlerFactory |
int |
hashCode()
|
java.lang.Object |
insert(SessionScope session,
java.lang.String id,
java.lang.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 |
isLazyLoadingEnabled()
Getter for the status of lazy loading |
protected RequestScope |
popRequest(SessionScope session,
MappedStatement mappedStatement)
|
protected SessionScope |
popSession()
|
protected void |
pushRequest(RequestScope request)
|
protected void |
pushSession(SessionScope session)
|
java.util.List |
queryForList(SessionScope session,
java.lang.String id,
java.lang.Object paramObject)
Execute a query for a list |
java.util.List |
queryForList(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
int skip,
int max)
Execute a query for a list |
java.util.Map |
queryForMap(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
java.lang.String keyProp)
Execute a query for a map. |
java.util.Map |
queryForMap(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
java.lang.String keyProp,
java.lang.String valueProp)
Execute a query for a map. |
java.lang.Object |
queryForObject(SessionScope session,
java.lang.String id,
java.lang.Object paramObject)
Execute a select for a single object |
java.lang.Object |
queryForObject(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
java.lang.Object resultObject)
Execute a select for a single object |
PaginatedList |
queryForPaginatedList(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
int pageSize)
Execute a query and return a paginated list |
void |
queryWithRowHandler(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
RowHandler rowHandler)
Execute a query with a row handler. |
void |
setCacheModelsEnabled(boolean cacheModelsEnabled)
Turn on or off caching |
void |
setEnhancementEnabled(boolean enhancementEnabled)
Turn on or off CGLib enhancements |
void |
setLazyLoadingEnabled(boolean lazyLoadingEnabled)
Turn on or off lazy loading |
void |
setMaxRequests(int maxRequests)
Setter for the maximum number of requests |
void |
setMaxSessions(int maxSessions)
Setter for the maximum number of sessions |
void |
setMaxTransactions(int maxTransactions)
Setter for the maximum number of transactions |
void |
setTxManager(TransactionManager txManager)
Setter for the transaction manager |
void |
setUserProvidedTransaction(SessionScope session,
java.sql.Connection userConnection)
Use a user-provided transaction for a session |
void |
startBatch(SessionScope session)
Start a batch for a session |
void |
startTransaction(SessionScope session)
Start a transaction on the session |
void |
startTransaction(SessionScope session,
int transactionIsolation)
Start a transaction on the session with the specified isolation level. |
int |
update(SessionScope session,
java.lang.String id,
java.lang.Object param)
Execute an update statement |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_MAX_REQUESTS
public static final int DEFAULT_MAX_SESSIONS
public static final int DEFAULT_MAX_TRANSACTIONS
| Constructor Detail |
public SqlMapExecutorDelegate()
| Method Detail |
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 int getMaxRequests()
public void setMaxRequests(int maxRequests)
maxRequests - - the maximum number of requestspublic int getMaxSessions()
public void setMaxSessions(int maxSessions)
maxSessions - - the maximum number of sessionspublic int getMaxTransactions()
public void setMaxTransactions(int maxTransactions)
maxTransactions - - the maximum number of transactionspublic TransactionManager getTxManager()
public void setTxManager(TransactionManager txManager)
txManager - - the transaction managerpublic void addMappedStatement(MappedStatement ms)
ms - - the mapped statement to addpublic java.util.Iterator getMappedStatementNames()
public MappedStatement getMappedStatement(java.lang.String id)
id - - the statement ID
public void addCacheModel(CacheModel model)
model - - the model to addpublic java.util.Iterator getCacheModelNames()
public CacheModel getCacheModel(java.lang.String id)
id - - the ID
public void addResultMap(ResultMap map)
map - - the result map to addpublic java.util.Iterator getResultMapNames()
public ResultMap getResultMap(java.lang.String id)
id - - the ID
public void addParameterMap(ParameterMap map)
map - - the map to addpublic java.util.Iterator getParameterMapNames()
public ParameterMap getParameterMap(java.lang.String id)
id - - the ID
public void flushDataCache()
public void flushDataCache(java.lang.String id)
id - - the ID
public java.lang.Object insert(SessionScope session,
java.lang.String id,
java.lang.Object param)
throws java.sql.SQLException
session - - the sessionid - - the statement IDparam - - the parameter object
java.sql.SQLException - - if the insert fails
public int update(SessionScope session,
java.lang.String id,
java.lang.Object param)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparam - - the parameter object
java.sql.SQLException - - if the update fails
public int delete(SessionScope session,
java.lang.String id,
java.lang.Object param)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparam - - the parameter object
java.sql.SQLException - - if the delete fails
public java.lang.Object queryForObject(SessionScope session,
java.lang.String id,
java.lang.Object paramObject)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparamObject - - the parameter object
java.sql.SQLException - - if the query fails
public java.lang.Object queryForObject(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
java.lang.Object resultObject)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparamObject - - the parameter objectresultObject - - the result object (if not supplied or null, a new object will be created)
java.sql.SQLException - - if the query fails
public java.util.List queryForList(SessionScope session,
java.lang.String id,
java.lang.Object paramObject)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparamObject - - the parameter object
java.sql.SQLException - - if the query fails
public java.util.List queryForList(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
int skip,
int max)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparamObject - - the parameter objectskip - - the number of rows to skipmax - - the maximum number of rows to return
java.sql.SQLException - - if the query fails
public void queryWithRowHandler(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
RowHandler rowHandler)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparamObject - - the parameter objectrowHandler - - the row handler
java.sql.SQLException - - if the query fails
public PaginatedList queryForPaginatedList(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
int pageSize)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparamObject - - the parameter objectpageSize - - the page size
java.sql.SQLException - - if the query fails
public java.util.Map queryForMap(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
java.lang.String keyProp)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparamObject - - the parameter objectkeyProp - - the key property (from the results for the map)
java.sql.SQLException - - if the query fails
public java.util.Map queryForMap(SessionScope session,
java.lang.String id,
java.lang.Object paramObject,
java.lang.String keyProp,
java.lang.String valueProp)
throws java.sql.SQLException
session - - the session scopeid - - the statement IDparamObject - - the parameter objectkeyProp - - the property for the map keyvalueProp - - the property for the map data
java.sql.SQLException - - if the query fails
public void startTransaction(SessionScope session)
throws java.sql.SQLException
session - - the session
java.sql.SQLException - - if the transaction could not be started
public void startTransaction(SessionScope session,
int transactionIsolation)
throws java.sql.SQLException
session - - the session
java.sql.SQLException - - if the transaction could not be started
public void commitTransaction(SessionScope session)
throws java.sql.SQLException
session - - the session
java.sql.SQLException - - if the transaction could not be committed
public void endTransaction(SessionScope session)
throws java.sql.SQLException
session - - the session
java.sql.SQLException - - if the transaction could not be endedpublic void startBatch(SessionScope session)
session - - the session
public int executeBatch(SessionScope session)
throws java.sql.SQLException
session - - the session
java.sql.SQLException - - if the batch fails
public void setUserProvidedTransaction(SessionScope session,
java.sql.Connection userConnection)
session - - the session scopeuserConnection - - the user supplied connectionpublic javax.sql.DataSource getDataSource()
public SqlExecutor getSqlExecutor()
public Transaction getTransaction(SessionScope session)
session - - the session
public boolean equals(java.lang.Object obj)
public int hashCode()
protected RequestScope popRequest(SessionScope session,
MappedStatement mappedStatement)
protected void pushRequest(RequestScope request)
protected SessionScope popSession()
protected void pushSession(SessionScope session)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||