Class CountExecutor

java.lang.Object
org.miaixz.bus.pager.builtin.CountExecutor

public abstract class CountExecutor extends Object
count 查询
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Long
    executeAutoCount(Dialect dialect, org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement countMs, Object parameter, org.apache.ibatis.mapping.BoundSql boundSql, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler)
    执行自动生成的 count 查询
    static Long
    executeManualCount(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement countMs, Object parameter, org.apache.ibatis.mapping.BoundSql boundSql, org.apache.ibatis.session.ResultHandler resultHandler)
    执行手动设置的 count 查询,该查询支持的参数必须和被分页的方法相同
    static Map<String,Object>
    getAdditionalParameter(org.apache.ibatis.mapping.BoundSql boundSql)
    获取 BoundSql 属性值 additionalParameters
    static org.apache.ibatis.mapping.MappedStatement
    getExistedMappedStatement(org.apache.ibatis.session.Configuration configuration, String msId)
    尝试获取已经存在的在 MS,提供对手写count和page的支持
    static String[]
    getProviderMethodArgumentNames(org.apache.ibatis.builder.annotation.ProviderSqlSource providerSqlSource)
    获取 ProviderSqlSource 属性值 providerMethodArgumentNames
    static <E> List<E>
    pageQuery(Dialect dialect, org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql, org.apache.ibatis.cache.CacheKey cacheKey)
    分页查询

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CountExecutor

      public CountExecutor()
  • Method Details

    • getAdditionalParameter

      public static Map<String,Object> getAdditionalParameter(org.apache.ibatis.mapping.BoundSql boundSql)
      获取 BoundSql 属性值 additionalParameters
      Parameters:
      boundSql - boundSql
      Returns:
      the map
    • getProviderMethodArgumentNames

      public static String[] getProviderMethodArgumentNames(org.apache.ibatis.builder.annotation.ProviderSqlSource providerSqlSource)
      获取 ProviderSqlSource 属性值 providerMethodArgumentNames
      Parameters:
      providerSqlSource - 服务提供者
      Returns:
      the array
    • getExistedMappedStatement

      public static org.apache.ibatis.mapping.MappedStatement getExistedMappedStatement(org.apache.ibatis.session.Configuration configuration, String msId)
      尝试获取已经存在的在 MS,提供对手写count和page的支持
      Parameters:
      configuration - 配置
      msId - 标识
      Returns:
      the mappedStatement
    • executeManualCount

      public static Long executeManualCount(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement countMs, Object parameter, org.apache.ibatis.mapping.BoundSql boundSql, org.apache.ibatis.session.ResultHandler resultHandler) throws SQLException
      执行手动设置的 count 查询,该查询支持的参数必须和被分页的方法相同
      Parameters:
      executor - 执行者
      countMs - MappedStatement
      parameter - 参数
      boundSql - BoundSql
      resultHandler - ResultHandler
      Returns:
      the long
      Throws:
      SQLException - 异常
    • executeAutoCount

      public static Long executeAutoCount(Dialect dialect, org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement countMs, Object parameter, org.apache.ibatis.mapping.BoundSql boundSql, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler) throws SQLException
      执行自动生成的 count 查询
      Parameters:
      dialect - 方言
      executor - 执行者
      countMs - MappedStatement
      parameter - 参数
      boundSql - BoundSql
      rowBounds - RowBounds
      resultHandler - ResultHandler
      Returns:
      the long
      Throws:
      SQLException - 异常
    • pageQuery

      public static <E> List<E> pageQuery(Dialect dialect, org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement ms, Object parameter, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql, org.apache.ibatis.cache.CacheKey cacheKey) throws SQLException
      分页查询
      Type Parameters:
      E - 对象
      Parameters:
      dialect - 方言
      executor - 执行者
      ms - MappedStatement
      parameter - 参数
      rowBounds - RowBounds
      resultHandler - ResultHandler
      boundSql - BoundSql
      cacheKey - CacheKey
      Returns:
      the object
      Throws:
      SQLException - 异常