Record Class RenderedQuery

java.lang.Object
java.lang.Record
com.axelor.meta.query.render.RenderedQuery

public record RenderedQuery(RenderedQuery.QueryTemplate dataQuery, RenderedQuery.QueryTemplate countQuery, RenderedQuery.QueryTemplate summaryQuery, List<String> summaryKeys, boolean countByRows, Map<String,Object> params, List<QueryParameter> parameters, List<String> columnKeys, Class<? extends Model> model, String alias, QueryResultKind resultKind, Integer limit, Integer offset, boolean limitCapped) extends Record
  • Constructor Details

    • RenderedQuery

      public RenderedQuery(RenderedQuery.QueryTemplate dataQuery, RenderedQuery.QueryTemplate countQuery, RenderedQuery.QueryTemplate summaryQuery, List<String> summaryKeys, boolean countByRows, Map<String,Object> params, List<QueryParameter> parameters, List<String> columnKeys, Class<? extends Model> model, String alias, QueryResultKind resultKind, Integer limit, Integer offset, boolean limitCapped)
      Creates an instance of a RenderedQuery record class.
      Parameters:
      dataQuery - the value for the dataQuery record component
      countQuery - the value for the countQuery record component
      summaryQuery - the value for the summaryQuery record component
      summaryKeys - the value for the summaryKeys record component
      countByRows - the value for the countByRows record component
      params - the value for the params record component
      parameters - the value for the parameters record component
      columnKeys - the value for the columnKeys record component
      model - the value for the model record component
      alias - the value for the alias record component
      resultKind - the value for the resultKind record component
      limit - the value for the limit record component
      offset - the value for the offset record component
      limitCapped - the value for the limitCapped record component
  • Method Details

    • jpql

      public String jpql()
    • jpql

      public String jpql(String extraPredicate)
    • summaryJpql

      public String summaryJpql()
      The query-scope aggregate query, or null when the query declares no summaries.
    • countJpql

      public String countJpql()
    • countJpql

      public String countJpql(String extraPredicate)
    • withPage

      public RenderedQuery withPage(Integer limit, Integer offset, boolean limitCapped)
      The same query over a different window.
      Parameters:
      limitCapped - whether the limit was imposed by the engine rather than chosen by the caller or the query, which is what separates a truncated result from a deliberate page
    • 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.
    • dataQuery

      public RenderedQuery.QueryTemplate dataQuery()
      Returns the value of the dataQuery record component.
      Returns:
      the value of the dataQuery record component
    • countQuery

      public RenderedQuery.QueryTemplate countQuery()
      Returns the value of the countQuery record component.
      Returns:
      the value of the countQuery record component
    • summaryQuery

      public RenderedQuery.QueryTemplate summaryQuery()
      Returns the value of the summaryQuery record component.
      Returns:
      the value of the summaryQuery record component
    • summaryKeys

      public List<String> summaryKeys()
      Returns the value of the summaryKeys record component.
      Returns:
      the value of the summaryKeys record component
    • countByRows

      public boolean countByRows()
      Returns the value of the countByRows record component.
      Returns:
      the value of the countByRows record component
    • params

      public Map<String,Object> params()
      Returns the value of the params record component.
      Returns:
      the value of the params record component
    • parameters

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

      public List<String> columnKeys()
      Returns the value of the columnKeys record component.
      Returns:
      the value of the columnKeys record component
    • model

      public Class<? extends Model> model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • alias

      public String alias()
      Returns the value of the alias record component.
      Returns:
      the value of the alias record component
    • resultKind

      public QueryResultKind resultKind()
      Returns the value of the resultKind record component.
      Returns:
      the value of the resultKind 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
    • limitCapped

      public boolean limitCapped()
      Returns the value of the limitCapped record component.
      Returns:
      the value of the limitCapped record component