Class CachingStatement
java.lang.Object
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement
com.ibatis.sqlmap.engine.mapping.statement.CachingStatement
-
Constructor Summary
ConstructorsConstructorDescriptionCachingStatement(MappedStatement statement, CacheModel cacheModel) Instantiates a new caching statement. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExecuteListener(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.voidexecuteQueryWithRowHandler(StatementScope statementScope, Transaction trans, Object parameterObject, RowHandler rowHandler) Execute query with row handler.intexecuteUpdate(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.booleanChecks for multiple result maps.voidinitRequest(StatementScope statementScope) Inits the request.voidNotify listeners.voidsetBaseCacheKey(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:MappedStatementGets the id.- Overrides:
getIdin classMappedStatement- Returns:
- the id
-
getStatementType
Description copied from class:MappedStatementGets the statement type.- Overrides:
getStatementTypein classMappedStatement- Returns:
- the statement type
-
getResultSetType
Description copied from class:MappedStatementGets the result set type.- Overrides:
getResultSetTypein classMappedStatement- Returns:
- the result set type
-
getFetchSize
Description copied from class:MappedStatementGets the fetch size.- Overrides:
getFetchSizein classMappedStatement- Returns:
- the fetch size
-
getParameterMap
Description copied from class:MappedStatementGets the parameter map.- Overrides:
getParameterMapin classMappedStatement- Returns:
- the parameter map
-
getResultMap
Description copied from class:MappedStatementGets the result map.- Overrides:
getResultMapin classMappedStatement- Returns:
- the result map
-
executeUpdate
public int executeUpdate(StatementScope statementScope, Transaction trans, Object parameterObject) throws SQLException Description copied from class:MappedStatementExecute update.- Overrides:
executeUpdatein 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:MappedStatementExecute query for object.- Overrides:
executeQueryForObjectin 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:MappedStatementExecute query for list.- Overrides:
executeQueryForListin 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:MappedStatementExecute query with row handler.- Overrides:
executeQueryWithRowHandlerin classMappedStatement- Parameters:
statementScope- the statement scopetrans- the transparameterObject- the parameter objectrowHandler- the row handler- Throws:
SQLException- the SQL exception
-
getCacheKey
Description copied from class:MappedStatementGets the cache key.- Overrides:
getCacheKeyin classMappedStatement- Parameters:
statementScope- the statement scopeparameterObject- the parameter object- Returns:
- the cache key
-
setBaseCacheKey
public void setBaseCacheKey(int base) Description copied from class:MappedStatementSets the base cache key.- Overrides:
setBaseCacheKeyin classMappedStatement- Parameters:
base- the new base cache key
-
addExecuteListener
Description copied from class:MappedStatementAdds the execute listener.- Overrides:
addExecuteListenerin classMappedStatement- Parameters:
listener- the listener
-
notifyListeners
public void notifyListeners()Description copied from class:MappedStatementNotify listeners.- Overrides:
notifyListenersin classMappedStatement
-
initRequest
Description copied from class:MappedStatementInits the request.- Overrides:
initRequestin classMappedStatement- Parameters:
statementScope- the statement scope
-
getSql
Description copied from class:MappedStatementGets the sql.- Overrides:
getSqlin classMappedStatement- Returns:
- the sql
-
getParameterClass
Description copied from class:MappedStatementGets the parameter class.- Overrides:
getParameterClassin classMappedStatement- Returns:
- the parameter class
-
getTimeout
Description copied from class:MappedStatementGets the timeout.- Overrides:
getTimeoutin classMappedStatement- Returns:
- the timeout
-
hasMultipleResultMaps
public boolean hasMultipleResultMaps()Description copied from class:MappedStatementChecks for multiple result maps.- Overrides:
hasMultipleResultMapsin classMappedStatement- Returns:
- true, if successful
-
getAdditionalResultMaps
Description copied from class:MappedStatementGets the additional result maps.- Overrides:
getAdditionalResultMapsin classMappedStatement- Returns:
- the additional result maps
-