java.lang.Object
org.miaixz.bus.pager.binding.CountExecutor
count 查询
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LongexecuteAutoCount(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 LongexecuteManualCount(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 查询,该查询支持的参数必须和被分页的方法相同getAdditionalParameter(org.apache.ibatis.mapping.BoundSql boundSql) 获取 BoundSql 属性值 additionalParametersstatic org.apache.ibatis.mapping.MappedStatementgetExistedMappedStatement(org.apache.ibatis.session.Configuration configuration, String msId) 尝试获取已经存在的在 MS,提供对手写count和page的支持static String[]getProviderMethodArgumentNames(org.apache.ibatis.builder.annotation.ProviderSqlSource providerSqlSource) 获取 ProviderSqlSource 属性值 providerMethodArgumentNamesstatic <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) 分页查询
-
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- MappedStatementparameter- 参数boundSql- BoundSqlresultHandler- 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- MappedStatementparameter- 参数boundSql- BoundSqlrowBounds- RowBoundsresultHandler- 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- MappedStatementparameter- 参数rowBounds- RowBoundsresultHandler- ResultHandlerboundSql- BoundSqlcacheKey- CacheKey- Returns:
- the object
- Throws:
SQLException- 异常
-