Record Class QueryPlan

java.lang.Object
java.lang.Record
com.axelor.meta.query.plan.QueryPlan

public record QueryPlan(String name, QuerySource root, boolean distinct, List<QuerySelection> selections, List<QuerySelection> summaries, List<QueryJoinClause> joins, QueryPredicate where, List<QueryExpression> groupBy, QueryPredicate having, List<QueryParameter> parameters, List<QuerySort> orderBy, Integer limit, Integer offset, QueryResultKind resultKind) extends Record
An analyzed query.

summaries are aggregates over the whole filtered set, evaluated without the result window and without the grouping, so a consumer can state a query total rather than adding up the rows it happens to be holding.

  • Constructor Details

    • QueryPlan

      public QueryPlan(String name, QuerySource root, boolean distinct, List<QuerySelection> selections, List<QuerySelection> summaries, List<QueryJoinClause> joins, QueryPredicate where, List<QueryExpression> groupBy, QueryPredicate having, List<QueryParameter> parameters, List<QuerySort> orderBy, Integer limit, Integer offset, QueryResultKind resultKind)
      Creates an instance of a QueryPlan record class.
      Parameters:
      name - the value for the name record component
      root - the value for the root record component
      distinct - the value for the distinct record component
      selections - the value for the selections record component
      summaries - the value for the summaries record component
      joins - the value for the joins record component
      where - the value for the where record component
      groupBy - the value for the groupBy record component
      having - the value for the having record component
      parameters - the value for the parameters record component
      orderBy - the value for the orderBy record component
      limit - the value for the limit record component
      offset - the value for the offset record component
      resultKind - the value for the resultKind record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • root

      public QuerySource root()
      Returns the value of the root record component.
      Returns:
      the value of the root record component
    • distinct

      public boolean distinct()
      Returns the value of the distinct record component.
      Returns:
      the value of the distinct record component
    • selections

      public List<QuerySelection> selections()
      Returns the value of the selections record component.
      Returns:
      the value of the selections record component
    • summaries

      public List<QuerySelection> summaries()
      Returns the value of the summaries record component.
      Returns:
      the value of the summaries record component
    • joins

      public List<QueryJoinClause> joins()
      Returns the value of the joins record component.
      Returns:
      the value of the joins record component
    • where

      public QueryPredicate where()
      Returns the value of the where record component.
      Returns:
      the value of the where record component
    • groupBy

      public List<QueryExpression> groupBy()
      Returns the value of the groupBy record component.
      Returns:
      the value of the groupBy record component
    • having

      public QueryPredicate having()
      Returns the value of the having record component.
      Returns:
      the value of the having record component
    • parameters

      public List<QueryParameter> parameters()
      Returns the value of the parameters record component.
      Returns:
      the value of the parameters record component
    • orderBy

      public List<QuerySort> orderBy()
      Returns the value of the orderBy record component.
      Returns:
      the value of the orderBy record component
    • limit

      public Integer limit()
      Returns the value of the limit record component.
      Returns:
      the value of the limit record component
    • offset

      public Integer offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • resultKind

      public QueryResultKind resultKind()
      Returns the value of the resultKind record component.
      Returns:
      the value of the resultKind record component