public abstract class AbstractHelperDialect extends AbstractDialect implements Constant
countSqlParserPAGEPARAMETER_FIRST, PAGEPARAMETER_SECOND, SUFFIX_COUNT, SUFFIX_PAGE| Constructor and Description | 
|---|
| AbstractHelperDialect() | 
| 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 | getCountSql(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 countKey)生成 count 查询 sql | 
| <T> Page<T> | getLocalPage()获取分页参数 | 
| 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,
          Page page,
          org.apache.ibatis.cache.CacheKey pageKey)单独处理分页部分 | 
| protected void | handleParameter(org.apache.ibatis.mapping.BoundSql boundSql,
               org.apache.ibatis.mapping.MappedStatement ms) | 
| abstract Object | processPageParameter(org.apache.ibatis.mapping.MappedStatement ms,
                    Map<String,Object> paramMap,
                    Page page,
                    org.apache.ibatis.mapping.BoundSql boundSql,
                    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 和 分页查询 | 
public <T> Page<T> getLocalPage()
T - public final boolean skip(org.apache.ibatis.mapping.MappedStatement ms,
                          Object parameterObject,
                          org.apache.ibatis.session.RowBounds rowBounds)
Dialectpublic boolean beforeCount(org.apache.ibatis.mapping.MappedStatement ms,
                           Object parameterObject,
                           org.apache.ibatis.session.RowBounds rowBounds)
DialectbeforeCount in interface Dialectms - MappedStatementparameterObject - 方法参数rowBounds - 分页参数public String getCountSql(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 countKey)
DialectgetCountSql in interface DialectgetCountSql in class AbstractDialectms - MappedStatementboundSql - 绑定 SQL 对象parameterObject - 方法参数rowBounds - 分页参数countKey - count 缓存 keypublic boolean afterCount(long count,
                          Object parameterObject,
                          org.apache.ibatis.session.RowBounds rowBounds)
DialectafterCount in interface Dialectcount - 查询结果总数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)
DialectprocessParameterObject in interface Dialectms - MappedStatementpublic abstract Object processPageParameter(org.apache.ibatis.mapping.MappedStatement ms, Map<String,Object> paramMap, Page page, org.apache.ibatis.mapping.BoundSql boundSql, org.apache.ibatis.cache.CacheKey pageKey)
ms - paramMap - page - boundSql - pageKey - public boolean beforePage(org.apache.ibatis.mapping.MappedStatement ms,
                          Object parameterObject,
                          org.apache.ibatis.session.RowBounds rowBounds)
DialectbeforePage in interface Dialectms - 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)
DialectgetPageSql in interface Dialectms - MappedStatementboundSql - 绑定 SQL 对象parameterObject - 方法参数rowBounds - 分页参数pageKey - 分页缓存 keypublic abstract String getPageSql(String sql, Page page, org.apache.ibatis.cache.CacheKey pageKey)
sql - page - pageKey - public Object afterPage(List pageList, Object parameterObject, org.apache.ibatis.session.RowBounds rowBounds)
Dialectpublic void afterAll()
Dialectpublic void setProperties(Properties properties)
DialectsetProperties in interface Dialectproperties - 插件属性protected void handleParameter(org.apache.ibatis.mapping.BoundSql boundSql,
                               org.apache.ibatis.mapping.MappedStatement ms)
Copyright © 2018. All rights reserved.