public interface InnerInterceptor
限定符和类型 | 方法和说明 |
---|---|
default void |
beforePrepare(org.apache.ibatis.executor.statement.StatementHandler sh,
java.sql.Connection connection,
java.lang.Integer transactionTimeout)
StatementHandler.prepare(Connection, Integer) 操作前置处理
改改sql啥的 |
default void |
beforeQuery(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement ms,
java.lang.Object parameter,
org.apache.ibatis.session.RowBounds rowBounds,
org.apache.ibatis.session.ResultHandler resultHandler,
org.apache.ibatis.mapping.BoundSql boundSql)
Executor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql) 操作前置处理
改改sql啥的 |
default void |
beforeUpdate(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement ms,
java.lang.Object parameter)
Executor.update(MappedStatement, Object) 操作前置处理
改改sql啥的 |
default void |
setProperties(java.util.Properties properties) |
default boolean |
willDoQuery(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement ms,
java.lang.Object parameter,
org.apache.ibatis.session.RowBounds rowBounds,
org.apache.ibatis.session.ResultHandler resultHandler,
org.apache.ibatis.mapping.BoundSql boundSql)
判断是否执行
Executor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql)
如果不执行query操作,则返回 Collections.emptyList() |
default boolean |
willDoUpdate(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement ms,
java.lang.Object parameter)
判断是否执行
Executor.update(MappedStatement, Object)
如果不执行update操作,则影响行数的值为 -1 |
default boolean willDoQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql) throws java.sql.SQLException
Executor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql)
如果不执行query操作,则返回 Collections.emptyList()
executor
- Executor(可能是代理对象)ms
- MappedStatementparameter
- parameterrowBounds
- rowBoundsresultHandler
- resultHandlerboundSql
- boundSqljava.sql.SQLException
default void beforeQuery(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql) throws java.sql.SQLException
Executor.query(MappedStatement, Object, RowBounds, ResultHandler, CacheKey, BoundSql)
操作前置处理
改改sql啥的
executor
- Executor(可能是代理对象)ms
- MappedStatementparameter
- parameterrowBounds
- rowBoundsresultHandler
- resultHandlerboundSql
- boundSqljava.sql.SQLException
default boolean willDoUpdate(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter) throws java.sql.SQLException
Executor.update(MappedStatement, Object)
如果不执行update操作,则影响行数的值为 -1
executor
- Executor(可能是代理对象)ms
- MappedStatementparameter
- parameterjava.sql.SQLException
default void beforeUpdate(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, java.lang.Object parameter) throws java.sql.SQLException
Executor.update(MappedStatement, Object)
操作前置处理
改改sql啥的
executor
- Executor(可能是代理对象)ms
- MappedStatementparameter
- parameterjava.sql.SQLException
default void beforePrepare(org.apache.ibatis.executor.statement.StatementHandler sh, java.sql.Connection connection, java.lang.Integer transactionTimeout)
StatementHandler.prepare(Connection, Integer)
操作前置处理
改改sql啥的
sh
- StatementHandler(可能是代理对象)connection
- ConnectiontransactionTimeout
- transactionTimeoutdefault void setProperties(java.util.Properties properties)