Class AggregateCondition

java.lang.Object
org.miaixz.bus.mapper.additional.aggregation.AggregateCondition
All Implemented Interfaces:
Serializable

public class AggregateCondition extends Object implements Serializable
聚合查询条件
Since:
Java 17+
Author:
Kimi Liu
See Also:
  • Constructor Details

    • AggregateCondition

      public AggregateCondition()
      构造
    • AggregateCondition

      public AggregateCondition(String aggregateProperty)
      默认查询count计数,不分组
      Parameters:
      aggregateProperty - 聚合查询属性,不能为空;为保证返回结果key与传入值相同 方法不会去除前后空格
    • AggregateCondition

      public AggregateCondition(String aggregateProperty, String[] groupByProperties)
      默认查询count计数
      Parameters:
      aggregateProperty - 聚合查询属性,不能为空;为保证返回结果key与传入值相同 方法不会去除前后空格
      groupByProperties - 为保证返回结果key与传入值相同 方法不会去除每一项前后空格
    • AggregateCondition

      public AggregateCondition(String aggregateProperty, AggregateType aggregateType)
      按指定聚合方法查询,不分组
      Parameters:
      aggregateProperty - 不能为空,为保证返回结果key与传入值相同 方法不会去除前后空格
      aggregateType - 聚合函数
    • AggregateCondition

      public AggregateCondition(String aggregateProperty, AggregateType aggregateType, String[] groupByProperties)
      查询
      Parameters:
      aggregateProperty - 不能为空,为保证返回结果key与传入值相同 方法不会去除前后空格
      aggregateType - 聚合函数
      groupByProperties - 为保证返回结果key与传入值相同 方法不会去除每一项前后空格
  • Method Details

    • builder

      public static AggregateCondition builder()
      构造
      Returns:
      the object
    • groupBy

      public AggregateCondition groupBy(String... groupByProperties)
      查询条件
      Parameters:
      groupByProperties - 属性
      Returns:
      the object
    • aggregateBy

      public AggregateCondition aggregateBy(String aggregateProperty)
      查询条件
      Parameters:
      aggregateProperty - 属性
      Returns:
      the object
    • aliasName

      public AggregateCondition aliasName(String aggregateAliasName)
    • aggregateType

      public AggregateCondition aggregateType(AggregateType aggregateType)
      aggregateType
      Parameters:
      aggregateType - aggregateType
      Returns:
      the object
    • getAggregateProperty

      public String getAggregateProperty()
    • getAggregateAliasName

      public String getAggregateAliasName()
    • getGroupByProperties

      public List<String> getGroupByProperties()
    • getAggregateType

      public AggregateType getAggregateType()