Class CachingStatement
java.lang.Object
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement
com.ibatis.sqlmap.engine.mapping.statement.CachingStatement
The Class CachingStatement.
-
Constructor Summary
ConstructorDescriptionCachingStatement
(MappedStatement statement, CacheModel cacheModel) Instantiates a new caching statement. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExecuteListener
(ExecuteListener listener) Adds the execute listener.executeQueryForList
(StatementScope statementScope, Transaction trans, Object parameterObject, int skipResults, int maxResults) Execute query for list.executeQueryForObject
(StatementScope statementScope, Transaction trans, Object parameterObject, Object resultObject) Execute query for object.void
executeQueryWithRowHandler
(StatementScope statementScope, Transaction trans, Object parameterObject, RowHandler rowHandler) Execute query with row handler.int
executeUpdate
(StatementScope statementScope, Transaction trans, Object parameterObject) Execute update.Gets the additional result maps.getCacheKey
(StatementScope statementScope, Object parameterObject) Gets the cache key.Gets the fetch size.getId()
Gets the id.Gets the parameter class.Gets the parameter map.Gets the result map.Gets the result set type.getSql()
Gets the sql.Gets the statement type.Gets the timeout.boolean
Checks for multiple result maps.void
initRequest
(StatementScope statementScope) Inits the request.void
Notify listeners.void
setBaseCacheKey
(int base) Sets the base cache key.Methods inherited from class com.ibatis.sqlmap.engine.mapping.statement.MappedStatement
addResultMap, executeQueryWithCallback, getResource, getSqlExecutor, getSqlMapClient, postProcessParameterObject, setFetchSize, setId, setParameterClass, setParameterMap, setResource, setResultMap, setResultSetType, setSql, setSqlMapClient, setTimeout, sqlExecuteQuery, sqlExecuteUpdate, validateParameter
-
Constructor Details
-
CachingStatement
Instantiates a new caching statement.- Parameters:
statement
- the statementcacheModel
- the cache model
-
-
Method Details
-
getId
Description copied from class:MappedStatement
Gets the id.- Overrides:
getId
in classMappedStatement
- Returns:
- the id
-
getStatementType
Description copied from class:MappedStatement
Gets the statement type.- Overrides:
getStatementType
in classMappedStatement
- Returns:
- the statement type
-
getResultSetType
Description copied from class:MappedStatement
Gets the result set type.- Overrides:
getResultSetType
in classMappedStatement
- Returns:
- the result set type
-
getFetchSize
Description copied from class:MappedStatement
Gets the fetch size.- Overrides:
getFetchSize
in classMappedStatement
- Returns:
- the fetch size
-
getParameterMap
Description copied from class:MappedStatement
Gets the parameter map.- Overrides:
getParameterMap
in classMappedStatement
- Returns:
- the parameter map
-
getResultMap
Description copied from class:MappedStatement
Gets the result map.- Overrides:
getResultMap
in classMappedStatement
- Returns:
- the result map
-
executeUpdate
public int executeUpdate(StatementScope statementScope, Transaction trans, Object parameterObject) throws SQLException Description copied from class:MappedStatement
Execute update.- Overrides:
executeUpdate
in classMappedStatement
- Parameters:
statementScope
- the statement scopetrans
- the transparameterObject
- the parameter object- Returns:
- the int
- Throws:
SQLException
- the SQL exception
-
executeQueryForObject
public Object executeQueryForObject(StatementScope statementScope, Transaction trans, Object parameterObject, Object resultObject) throws SQLException Description copied from class:MappedStatement
Execute query for object.- Overrides:
executeQueryForObject
in classMappedStatement
- Parameters:
statementScope
- the statement scopetrans
- the transparameterObject
- the parameter objectresultObject
- the result object- Returns:
- the object
- Throws:
SQLException
- the SQL exception
-
executeQueryForList
public List executeQueryForList(StatementScope statementScope, Transaction trans, Object parameterObject, int skipResults, int maxResults) throws SQLException Description copied from class:MappedStatement
Execute query for list.- Overrides:
executeQueryForList
in classMappedStatement
- Parameters:
statementScope
- the statement scopetrans
- the transparameterObject
- the parameter objectskipResults
- the skip resultsmaxResults
- the max results- Returns:
- the list
- Throws:
SQLException
- the SQL exception
-
executeQueryWithRowHandler
public void executeQueryWithRowHandler(StatementScope statementScope, Transaction trans, Object parameterObject, RowHandler rowHandler) throws SQLException Description copied from class:MappedStatement
Execute query with row handler.- Overrides:
executeQueryWithRowHandler
in classMappedStatement
- Parameters:
statementScope
- the statement scopetrans
- the transparameterObject
- the parameter objectrowHandler
- the row handler- Throws:
SQLException
- the SQL exception
-
getCacheKey
Description copied from class:MappedStatement
Gets the cache key.- Overrides:
getCacheKey
in classMappedStatement
- Parameters:
statementScope
- the statement scopeparameterObject
- the parameter object- Returns:
- the cache key
-
setBaseCacheKey
public void setBaseCacheKey(int base) Description copied from class:MappedStatement
Sets the base cache key.- Overrides:
setBaseCacheKey
in classMappedStatement
- Parameters:
base
- the new base cache key
-
addExecuteListener
Description copied from class:MappedStatement
Adds the execute listener.- Overrides:
addExecuteListener
in classMappedStatement
- Parameters:
listener
- the listener
-
notifyListeners
public void notifyListeners()Description copied from class:MappedStatement
Notify listeners.- Overrides:
notifyListeners
in classMappedStatement
-
initRequest
Description copied from class:MappedStatement
Inits the request.- Overrides:
initRequest
in classMappedStatement
- Parameters:
statementScope
- the statement scope
-
getSql
Description copied from class:MappedStatement
Gets the sql.- Overrides:
getSql
in classMappedStatement
- Returns:
- the sql
-
getParameterClass
Description copied from class:MappedStatement
Gets the parameter class.- Overrides:
getParameterClass
in classMappedStatement
- Returns:
- the parameter class
-
getTimeout
Description copied from class:MappedStatement
Gets the timeout.- Overrides:
getTimeout
in classMappedStatement
- Returns:
- the timeout
-
hasMultipleResultMaps
public boolean hasMultipleResultMaps()Description copied from class:MappedStatement
Checks for multiple result maps.- Overrides:
hasMultipleResultMaps
in classMappedStatement
- Returns:
- true, if successful
-
getAdditionalResultMaps
Description copied from class:MappedStatement
Gets the additional result maps.- Overrides:
getAdditionalResultMaps
in classMappedStatement
- Returns:
- the additional result maps
-