Class AggregationColumn


@GwtCompatible public class AggregationColumn extends Column

Immutable bean representing the column dot notation, alias, visibility (if it's should be shown to the client or not). Along with this it indicates if this function should be grouped by or which aggregation function is applied to this column instead.

This column can either be grouped or aggregated but not both, since they are mutually exclusive.

An instance can only be obtain by using the helper class QueryBuilder.Selecting or in a more object oriented way by using the helper class QueryBuilder.Aggregating

  • Field Details

  • Constructor Details

    • AggregationColumn

      protected AggregationColumn(String field, String alias, boolean visible)
      Constructs a new AggregationColumn which groups by the given field name with the given alias name.
      Parameters:
      field - a field name
      alias - an alias name
      visible - determines if this column will be visible or not.
    • AggregationColumn

      protected AggregationColumn(String field, String alias, boolean visible, AggregationFunction function)
      Constructs a new AggregationColumn which groups by the given field name with the given alias name.
      Parameters:
      field - a field name
      alias - an alias name
      visible - determines if this column will be visible or not.
      function - the AggregationFunction which will be apply for this column
    • AggregationColumn

      protected AggregationColumn(String field, String alias, boolean visible, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction)
      Constructs a new AggregationColumn which groups by the given field name with the given alias name.
      Parameters:
      field - a field name
      alias - an alias name
      visible - determines if this column will be visible or not.
      aggregationFunction - the AggregationFunction which will be applied for this column
      groupingFunction - the GroupingFunction which will be applied for this column
    • AggregationColumn

      protected AggregationColumn(String field, String alias, boolean visible, boolean isGrouping, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction)
    • AggregationColumn

      public AggregationColumn(AggregationColumn ac)
      Copy constructor
      Parameters:
      ac - an AggregationColumn
  • Method Details

    • isGrouping

      public boolean isGrouping()
    • getFunction

      public AggregationFunction getFunction()
    • getGroupingFunction

      public com.appiancorp.common.query.GroupingFunction getGroupingFunction()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Column
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Column
    • canEquals

      protected boolean canEquals(Object obj)
      Description copied from class: ColumnAlias
      Checks if this instance can compare against the given object.
      Overrides:
      canEquals in class Column
      Parameters:
      obj - an Object
      Returns:
      true if the given object is an instanceof this class.
    • toString

      public String toString()
      Overrides:
      toString in class Column