Class Query<T>

java.lang.Object
com.appiancorp.common.query.Query<T>
Type Parameters:
T - Type of value
Direct Known Subclasses:
GenericQuery, TypedValueQuery

@GwtCompatible public abstract class Query<T> extends Object
An object-oriented representation of a query. This supports operations for projection, grouping, aggregation and filtering/searching prior to aggregating data.

If no selection is specified, all columns will be returned.

A Query instance is obtained by using QueryBuilder. Query instances are immutable.

  • Field Details

  • Constructor Details

  • Method Details

    • getProjection

      public Projection getProjection()
      Gets the Projection
      Returns:
      the Projection
    • getPagingInfo

      public PagingInfo getPagingInfo()
      Gets the PagingInfo
      Returns:
      the PagingInfo
    • getCriteria

      public abstract Criteria getCriteria()
      Gets the Criteria
      Returns:
      the Criteria
    • setCriteria

      protected abstract void setCriteria(Criteria criteria)
      Sets the Criteria
      Parameters:
      criteria - the Criteria
    • hasSort

      public boolean hasSort()
      Checks if sorting information has been provided
      Returns:
      true if the Query has sorting information; false otherwise
    • isGrouping

      public boolean isGrouping()
      Checks if at least once column is being grouped by
      Returns:
      true if there is at least one column which is grouped by; false otherwise
    • hasSearch

      public boolean hasSearch()
      Checks if the search criteria is being used
      Returns:
      true if the search criteria is being used; false otherwise
    • getColumnIgnoreCase

      public Column getColumnIgnoreCase(String alias)
      Returns the Column associated with the given alias ignoring case sensitivity.
      Parameters:
      alias -
      Returns:
      the Column associated with the given alias
    • isProjection

      public boolean isProjection()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringMultiline

      public String toStringMultiline()
      Returns a multiline string representation of the Query
      Returns:
      a multiline string representation of the Query
    • multilineToString

      public static com.appian.core.base.ToStringFunction<Query<?>> multilineToString(int indent)
      Returns a multiline string representation of the Query by indenting each element with given number of characters.
      Parameters:
      indent - number of characters to indent
      Returns:
      a ToStringFunction for Query
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object