public abstract class AbstractRowBoundsDialect extends AbstractDialect
countSqlParser
Constructor and Description |
---|
AbstractRowBoundsDialect() |
Modifier and Type | Method and Description |
---|---|
void |
afterAll()
完成所有任务后
|
boolean |
afterCount(long count,
Object parameterObject,
org.apache.ibatis.session.RowBounds rowBounds)
执行完 count 查询后
|
Object |
afterPage(List pageList,
Object parameterObject,
org.apache.ibatis.session.RowBounds rowBounds)
分页查询后,处理分页结果,拦截器中直接 return 该方法的返回值
|
boolean |
beforeCount(org.apache.ibatis.mapping.MappedStatement ms,
Object parameterObject,
org.apache.ibatis.session.RowBounds rowBounds)
执行分页前,返回 true 会进行 count 查询,false 会继续下面的 beforePage 判断
|
boolean |
beforePage(org.apache.ibatis.mapping.MappedStatement ms,
Object parameterObject,
org.apache.ibatis.session.RowBounds rowBounds)
执行分页前,返回 true 会进行分页查询,false 会返回默认查询结果
|
String |
getPageSql(org.apache.ibatis.mapping.MappedStatement ms,
org.apache.ibatis.mapping.BoundSql boundSql,
Object parameterObject,
org.apache.ibatis.session.RowBounds rowBounds,
org.apache.ibatis.cache.CacheKey pageKey)
生成分页查询 sql
|
abstract String |
getPageSql(String sql,
org.apache.ibatis.session.RowBounds rowBounds,
org.apache.ibatis.cache.CacheKey pageKey) |
Object |
processParameterObject(org.apache.ibatis.mapping.MappedStatement ms,
Object parameterObject,
org.apache.ibatis.mapping.BoundSql boundSql,
org.apache.ibatis.cache.CacheKey pageKey)
处理查询参数对象
|
void |
setProperties(Properties properties)
设置参数
|
boolean |
skip(org.apache.ibatis.mapping.MappedStatement ms,
Object parameterObject,
org.apache.ibatis.session.RowBounds rowBounds)
跳过 count 和 分页查询
|
getCountSql
public boolean skip(org.apache.ibatis.mapping.MappedStatement ms, Object parameterObject, org.apache.ibatis.session.RowBounds rowBounds)
Dialect
ms
- MappedStatementparameterObject
- 方法参数rowBounds
- 分页参数public boolean beforeCount(org.apache.ibatis.mapping.MappedStatement ms, Object parameterObject, org.apache.ibatis.session.RowBounds rowBounds)
Dialect
ms
- MappedStatementparameterObject
- 方法参数rowBounds
- 分页参数public boolean afterCount(long count, Object parameterObject, org.apache.ibatis.session.RowBounds rowBounds)
Dialect
count
- 查询结果总数parameterObject
- 接口参数rowBounds
- 分页参数public Object processParameterObject(org.apache.ibatis.mapping.MappedStatement ms, Object parameterObject, org.apache.ibatis.mapping.BoundSql boundSql, org.apache.ibatis.cache.CacheKey pageKey)
Dialect
ms
- MappedStatementpublic boolean beforePage(org.apache.ibatis.mapping.MappedStatement ms, Object parameterObject, org.apache.ibatis.session.RowBounds rowBounds)
Dialect
ms
- MappedStatementparameterObject
- 方法参数rowBounds
- 分页参数public String getPageSql(org.apache.ibatis.mapping.MappedStatement ms, org.apache.ibatis.mapping.BoundSql boundSql, Object parameterObject, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.cache.CacheKey pageKey)
Dialect
ms
- MappedStatementboundSql
- 绑定 SQL 对象parameterObject
- 方法参数rowBounds
- 分页参数pageKey
- 分页缓存 keypublic abstract String getPageSql(String sql, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.cache.CacheKey pageKey)
public Object afterPage(List pageList, Object parameterObject, org.apache.ibatis.session.RowBounds rowBounds)
Dialect
pageList
- 分页查询结果parameterObject
- 方法参数rowBounds
- 分页参数public void afterAll()
Dialect
public void setProperties(Properties properties)
Dialect
properties
- 插件属性Copyright © 2018. All rights reserved.