| java.lang.Object com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate
SqlMapExecutorDelegate | public class SqlMapExecutorDelegate (Code) | | The workhorse that really runs the SQL
|
Method Summary | |
public void | addCacheModel(CacheModel model) | public void | addMappedStatement(MappedStatement ms) | public void | addParameterMap(ParameterMap map) | public void | addResultMap(ResultMap map) | protected void | autoCommitTransaction(SessionScope session, boolean autoStart) | protected void | autoEndTransaction(SessionScope session, boolean autoStart) | protected Transaction | autoStartTransaction(SessionScope session, boolean autoStart, Transaction trans) | public void | commitTransaction(SessionScope session) | public int | delete(SessionScope session, String id, Object param) | public void | endTransaction(SessionScope session) | public boolean | equals(Object obj) | public int | executeBatch(SessionScope session) | public List | executeBatchDetailed(SessionScope session) Execute a batch for a session
Parameters: session - - the session - a List of BatchResult objects (may be null if no batchhas been initiated). | public void | flushDataCache() | public void | flushDataCache(String id) | public CacheModel | getCacheModel(String id) | public Iterator | getCacheModelNames() | public DataExchangeFactory | getDataExchangeFactory() | public DataSource | getDataSource() | public MappedStatement | getMappedStatement(String id) | public Iterator | getMappedStatementNames() | public int | getMaxRequests() | public int | getMaxSessions() | public int | getMaxTransactions() | public ParameterMap | getParameterMap(String id) | public Iterator | getParameterMapNames() | public ResultMap | getResultMap(String id) | public Iterator | getResultMapNames() | public ResultObjectFactory | getResultObjectFactory() | public SqlExecutor | getSqlExecutor() | public Transaction | getTransaction(SessionScope session) | public TransactionManager | getTxManager() | public TypeHandlerFactory | getTypeHandlerFactory() | public int | hashCode() | public Object | insert(SessionScope session, String id, Object param) | public boolean | isCacheModelsEnabled() | public boolean | isEnhancementEnabled() | public boolean | isLazyLoadingEnabled() | public boolean | isStatementCacheEnabled() | protected RequestScope | popRequest(SessionScope session, MappedStatement mappedStatement) | protected SessionScope | popSession() | protected void | pushRequest(RequestScope request) | protected void | pushSession(SessionScope session) | public List | queryForList(SessionScope session, String id, Object paramObject) | public List | queryForList(SessionScope session, String id, Object paramObject, int skip, int max) | public Map | queryForMap(SessionScope session, String id, Object paramObject, String keyProp) Execute a query for a map. | public Map | queryForMap(SessionScope session, String id, Object paramObject, String keyProp, String valueProp) Execute a query for a map. | public Object | queryForObject(SessionScope session, String id, Object paramObject) | public Object | queryForObject(SessionScope session, String id, Object paramObject, Object resultObject) | public PaginatedList | queryForPaginatedList(SessionScope session, String id, Object paramObject, int pageSize) | public void | queryWithRowHandler(SessionScope session, String id, Object paramObject, RowHandler rowHandler) Execute a query with a row handler. | public void | setCacheModelsEnabled(boolean cacheModelsEnabled) | public void | setEnhancementEnabled(boolean enhancementEnabled) | public void | setLazyLoadingEnabled(boolean lazyLoadingEnabled) | public void | setMaxRequests(int maxRequests) | public void | setMaxSessions(int maxSessions) | public void | setMaxTransactions(int maxTransactions) | public void | setResultObjectFactory(ResultObjectFactory resultObjectFactory) | public void | setStatementCacheEnabled(boolean statementCacheEnabled) | public void | setTxManager(TransactionManager txManager) | public void | setUserProvidedTransaction(SessionScope session, Connection userConnection) | public void | startBatch(SessionScope session) | public void | startTransaction(SessionScope session) | public void | startTransaction(SessionScope session, int transactionIsolation) Start a transaction on the session with the specified isolation level. | public int | update(SessionScope session, String id, Object param) |
DEFAULT_MAX_REQUESTS | final public static int DEFAULT_MAX_REQUESTS(Code) | | The default maximum number of requests
|
DEFAULT_MAX_SESSIONS | final public static int DEFAULT_MAX_SESSIONS(Code) | | The default maximum number of sessions
|
DEFAULT_MAX_TRANSACTIONS | final public static int DEFAULT_MAX_TRANSACTIONS(Code) | | The default maximum number of transactions
|
SqlMapExecutorDelegate | public SqlMapExecutorDelegate()(Code) | | Default constructor
|
addCacheModel | public void addCacheModel(CacheModel model)(Code) | | Add a cache model
Parameters: model - - the model to add |
addMappedStatement | public void addMappedStatement(MappedStatement ms)(Code) | | Add a mapped statement
Parameters: ms - - the mapped statement to add |
addParameterMap | public void addParameterMap(ParameterMap map)(Code) | | Add a parameter map
Parameters: map - - the map to add |
addResultMap | public void addResultMap(ResultMap map)(Code) | | Add a result map
Parameters: map - - the result map to add |
commitTransaction | public void commitTransaction(SessionScope session) throws SQLException(Code) | | Commit the transaction on a session
Parameters: session - - the session throws: SQLException - - if the transaction could not be committed |
delete | public int delete(SessionScope session, String id, Object param) throws SQLException(Code) | | Execute a delete statement
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: param - - the parameter object - the number of rows deleted throws: SQLException - - if the delete fails |
endTransaction | public void endTransaction(SessionScope session) throws SQLException(Code) | | End the transaction on a session
Parameters: session - - the session throws: SQLException - - if the transaction could not be ended |
executeBatch | public int executeBatch(SessionScope session) throws SQLException(Code) | | Execute a batch for a session
Parameters: session - - the session - the number of rows impacted by the batch throws: SQLException - - if the batch fails |
executeBatchDetailed | public List executeBatchDetailed(SessionScope session) throws SQLException, BatchException(Code) | | Execute a batch for a session
Parameters: session - - the session - a List of BatchResult objects (may be null if no batchhas been initiated). There will be one BatchResult object in thelist for each sub-batch executed throws: SQLException - if a database access error occurs, or the drivedoes not support batch statements throws: BatchException - if the driver throws BatchUpdateException |
flushDataCache | public void flushDataCache()(Code) | | Flush all of the data caches
|
flushDataCache | public void flushDataCache(String id)(Code) | | Flush a single cache by ID
Parameters: id - - the ID |
getCacheModel | public CacheModel getCacheModel(String id)(Code) | | Get a cache model by ID
Parameters: id - - the ID - the cache model |
getCacheModelNames | public Iterator getCacheModelNames()(Code) | | Get an iterator of the cache models
- the cache models |
getDataExchangeFactory | public DataExchangeFactory getDataExchangeFactory()(Code) | | Getter for the DataExchangeFactory
- the DataExchangeFactory |
getDataSource | public DataSource getDataSource()(Code) | | Get the DataSource for the session
- the DataSource |
getMappedStatement | public MappedStatement getMappedStatement(String id)(Code) | | Get a mappedstatement by its ID
Parameters: id - - the statement ID - the mapped statement |
getMappedStatementNames | public Iterator getMappedStatementNames()(Code) | | Get an iterator of the mapped statements
- the iterator |
getMaxRequests | public int getMaxRequests()(Code) | | Getter for the maximum number of requests
- the maximum number of requests |
getMaxSessions | public int getMaxSessions()(Code) | | Getter for the maximum number of sessions
- the maximum number of sessions |
getMaxTransactions | public int getMaxTransactions()(Code) | | Getter for the the maximum number of transactions
- the maximum number of transactions |
getParameterMap | public ParameterMap getParameterMap(String id)(Code) | | Get a parameter map by ID
Parameters: id - - the ID - the parameter map |
getParameterMapNames | public Iterator getParameterMapNames()(Code) | | Get an iterator of all of the parameter maps
- the parameter maps |
getResultMap | public ResultMap getResultMap(String id)(Code) | | Get a result map by ID
Parameters: id - - the ID - the result map |
getResultMapNames | public Iterator getResultMapNames()(Code) | | Get an iterator of the result maps
- the result maps |
getSqlExecutor | public SqlExecutor getSqlExecutor()(Code) | | Getter for the SqlExecutor
the SqlExecutor |
getTransaction | public Transaction getTransaction(SessionScope session)(Code) | | Get a transaction for the session
Parameters: session - - the session - the transaction |
getTypeHandlerFactory | public TypeHandlerFactory getTypeHandlerFactory()(Code) | | Getter for the TypeHandlerFactory
- the TypeHandlerFactory |
hashCode | public int hashCode()(Code) | | |
insert | public Object insert(SessionScope session, String id, Object param) throws SQLException(Code) | | Call an insert statement by ID
Parameters: session - - the session Parameters: id - - the statement ID Parameters: param - - the parameter object - the generated key (or null) throws: SQLException - - if the insert fails |
isCacheModelsEnabled | public boolean isCacheModelsEnabled()(Code) | | Getter for the status of caching
- the status |
isEnhancementEnabled | public boolean isEnhancementEnabled()(Code) | | Getter for the status of CGLib enhancements
- the status |
isLazyLoadingEnabled | public boolean isLazyLoadingEnabled()(Code) | | Getter for the status of lazy loading
- the status |
isStatementCacheEnabled | public boolean isStatementCacheEnabled()(Code) | | |
queryForList | public List queryForList(SessionScope session, String id, Object paramObject) throws SQLException(Code) | | Execute a query for a list
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: paramObject - - the parameter object - the data list throws: SQLException - - if the query fails |
queryForList | public List queryForList(SessionScope session, String id, Object paramObject, int skip, int max) throws SQLException(Code) | | Execute a query for a list
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: paramObject - - the parameter object Parameters: skip - - the number of rows to skip Parameters: max - - the maximum number of rows to return - the data list throws: SQLException - - if the query fails |
queryForMap | public Map queryForMap(SessionScope session, String id, Object paramObject, String keyProp) throws SQLException(Code) | | Execute a query for a map.
The map has the table key as the key, and the results as the map data
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: paramObject - - the parameter object Parameters: keyProp - - the key property (from the results for the map) - the Map throws: SQLException - - if the query fails |
queryForMap | public Map queryForMap(SessionScope session, String id, Object paramObject, String keyProp, String valueProp) throws SQLException(Code) | | Execute a query for a map.
The map has the table key as the key, and a property from the results as the map data
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: paramObject - - the parameter object Parameters: keyProp - - the property for the map key Parameters: valueProp - - the property for the map data - the Map throws: SQLException - - if the query fails |
queryForObject | public Object queryForObject(SessionScope session, String id, Object paramObject) throws SQLException(Code) | | Execute a select for a single object
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: paramObject - - the parameter object - the result of the query throws: SQLException - - if the query fails |
queryForObject | public Object queryForObject(SessionScope session, String id, Object paramObject, Object resultObject) throws SQLException(Code) | | Execute a select for a single object
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: paramObject - - the parameter object Parameters: resultObject - - the result object (if not supplied or null, a new object will be created) - the result of the query throws: SQLException - - if the query fails |
queryForPaginatedList | public PaginatedList queryForPaginatedList(SessionScope session, String id, Object paramObject, int pageSize) throws SQLException(Code) | | Execute a query and return a paginated list
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: paramObject - - the parameter object Parameters: pageSize - - the page size - the data list throws: SQLException - - if the query fails |
queryWithRowHandler | public void queryWithRowHandler(SessionScope session, String id, Object paramObject, RowHandler rowHandler) throws SQLException(Code) | | Execute a query with a row handler.
The row handler is called once per row in the query results.
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: paramObject - - the parameter object Parameters: rowHandler - - the row handler throws: SQLException - - if the query fails |
setCacheModelsEnabled | public void setCacheModelsEnabled(boolean cacheModelsEnabled)(Code) | | Turn on or off caching
Parameters: cacheModelsEnabled - - the new state of caching |
setEnhancementEnabled | public void setEnhancementEnabled(boolean enhancementEnabled)(Code) | | Turn on or off CGLib enhancements
Parameters: enhancementEnabled - - the new state |
setLazyLoadingEnabled | public void setLazyLoadingEnabled(boolean lazyLoadingEnabled)(Code) | | Turn on or off lazy loading
Parameters: lazyLoadingEnabled - - the new state of caching |
setMaxRequests | public void setMaxRequests(int maxRequests)(Code) | | Setter for the maximum number of requests
Parameters: maxRequests - - the maximum number of requests |
setMaxSessions | public void setMaxSessions(int maxSessions)(Code) | | Setter for the maximum number of sessions
Parameters: maxSessions - - the maximum number of sessions |
setMaxTransactions | public void setMaxTransactions(int maxTransactions)(Code) | | Setter for the maximum number of transactions
Parameters: maxTransactions - - the maximum number of transactions |
setStatementCacheEnabled | public void setStatementCacheEnabled(boolean statementCacheEnabled)(Code) | | |
setTxManager | public void setTxManager(TransactionManager txManager)(Code) | | Setter for the transaction manager
Parameters: txManager - - the transaction manager |
setUserProvidedTransaction | public void setUserProvidedTransaction(SessionScope session, Connection userConnection)(Code) | | Use a user-provided transaction for a session
Parameters: session - - the session scope Parameters: userConnection - - the user supplied connection |
startBatch | public void startBatch(SessionScope session)(Code) | | Start a batch for a session
Parameters: session - - the session |
startTransaction | public void startTransaction(SessionScope session) throws SQLException(Code) | | Start a transaction on the session
Parameters: session - - the session throws: SQLException - - if the transaction could not be started |
startTransaction | public void startTransaction(SessionScope session, int transactionIsolation) throws SQLException(Code) | | Start a transaction on the session with the specified isolation level.
Parameters: session - - the session throws: SQLException - - if the transaction could not be started |
update | public int update(SessionScope session, String id, Object param) throws SQLException(Code) | | Execute an update statement
Parameters: session - - the session scope Parameters: id - - the statement ID Parameters: param - - the parameter object - the number of rows updated throws: SQLException - - if the update fails |
|
|