Package su.onno.ui

Record Class WidgetBuckets.Request

java.lang.Object
java.lang.Record
su.onno.ui.WidgetBuckets.Request
Enclosing class:
WidgetBuckets

public static record WidgetBuckets.Request(String metric, String field, String metric2, String field2, String groupBy, String groupByDate, String seriesBy, String filter, String dateField, String from, String to) extends Record
The widget's aggregate request, straight from the query string. metric/field are the primary measure (WidgetAggregate semantics); metric2/field2 add the optional secondary measure of a combo chart. groupBy is the x-axis column (blank → one grand-total bucket, the gauge/metric case); groupByDate buckets a timestamp column by unit. dateField+from/to window the rows to the dashboard's shared time range before aggregating.
  • Constructor Details

    • Request

      public Request(String metric, String field, String metric2, String field2, String groupBy, String groupByDate, String seriesBy, String filter, String dateField, String from, String to)
      Creates an instance of a Request record class.
      Parameters:
      metric - the value for the metric record component
      field - the value for the field record component
      metric2 - the value for the metric2 record component
      field2 - the value for the field2 record component
      groupBy - the value for the groupBy record component
      groupByDate - the value for the groupByDate record component
      seriesBy - the value for the seriesBy record component
      filter - the value for the filter record component
      dateField - the value for the dateField record component
      from - the value for the from record component
      to - the value for the to record component
  • Method Details

    • grouped

      public boolean grouped()
    • hasSeries

      public boolean hasSeries()
    • hasSecondary

      public boolean hasSecondary()
    • windowed

      public boolean windowed()
    • dateBucketed

      public boolean dateBucketed()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • metric

      public String metric()
      Returns the value of the metric record component.
      Returns:
      the value of the metric record component
    • field

      public String field()
      Returns the value of the field record component.
      Returns:
      the value of the field record component
    • metric2

      public String metric2()
      Returns the value of the metric2 record component.
      Returns:
      the value of the metric2 record component
    • field2

      public String field2()
      Returns the value of the field2 record component.
      Returns:
      the value of the field2 record component
    • groupBy

      public String groupBy()
      Returns the value of the groupBy record component.
      Returns:
      the value of the groupBy record component
    • groupByDate

      public String groupByDate()
      Returns the value of the groupByDate record component.
      Returns:
      the value of the groupByDate record component
    • seriesBy

      public String seriesBy()
      Returns the value of the seriesBy record component.
      Returns:
      the value of the seriesBy record component
    • filter

      public String filter()
      Returns the value of the filter record component.
      Returns:
      the value of the filter record component
    • dateField

      public String dateField()
      Returns the value of the dateField record component.
      Returns:
      the value of the dateField record component
    • from

      public String from()
      Returns the value of the from record component.
      Returns:
      the value of the from record component
    • to

      public String to()
      Returns the value of the to record component.
      Returns:
      the value of the to record component