Class QueryBuilderTools.Selector

java.lang.Object
com.appiancorp.common.query.QueryBuilderTools.Selector
Direct Known Subclasses:
GenericQuery.GenericBuilder.Selector, TypedValueQuery.TypedValueBuilder.Selector
Enclosing interface:
QueryBuilderTools

public static class QueryBuilderTools.Selector extends Object

This is how you instantiate columns to configure a query for selection, grouping or aggregation.

For aggregations there is QueryBuilder.Aggregator to help creating an aggregation it in a more organic way.

  • Constructor Details

    • Selector

      public Selector()
  • Method Details

    • as

      public static ColumnAlias as(String field, String alias)
      Creates a ColumnAlias for the given field name as the given alias
      Parameters:
      field - a field name
      alias - an alias name to assign to the column
      Returns:
      a ColumnAlias to assign to the projection
    • column

      public static Column column(String field)
      Creates a projection for the given field name.
      Parameters:
      field - a field name
      Returns:
      a Column representing a projection for the given field
    • column

      public static Column column(ColumnAlias ca)
      Creates a projection with the given ColumnAlias. This projection can be referred to by the given alias.
      Parameters:
      ca - a ColumnAlias to assign to the projection
      Returns:
      a Column representing a projection for the given field
    • column

      public static Column column(String field, String alias)
      Creates a projection for the given field name. This projection can be referred to by the given alias.
      Parameters:
      field - a field name
      alias - an alias name to assign to the projection
      Returns:
      a Column representing a projection for the given field as the given alias
    • column

      public static Column column(String field, boolean visible)
      Creates a visible or hidden projection for the given field name
      Parameters:
      field - a field name
      visible - if true the projection will be visible; otherwise it will be hidden
      Returns:
      a Column representing a projection for the given field.
    • column

      public static Column column(String field, String alias, boolean visible)
      Creates a visible or hidden projection for the given field name. This projection can be referred to by the given alias.
      Parameters:
      field - a field name
      alias - an alias name to assign to the projection
      visible - if true the projection will be visible; otherwise it will be hidden
      Returns:
      a Column representing a projection for the given field.