Interface AggregationFilter

All Superinterfaces:
Filter

public interface AggregationFilter extends Filter
Extension of Filter specific to aggregated results. This API designed to support DAOs that want to implement both "raw" filter results and "aggregate" filter results.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.solarnetwork.domain.datum.Aggregation
    Get an aggregation to apply to the query.
    Get an end date.
    net.solarnetwork.domain.datum.Aggregation
    Get an aggregation to apply to partial time ranges if the start or end dates do not align to exact boundaries defined by the aggregation value.
    Get a start date.

    Methods inherited from interface net.solarnetwork.central.domain.Filter

    getFilter
  • Method Details

    • getAggregation

      net.solarnetwork.domain.datum.Aggregation getAggregation()
      Get an aggregation to apply to the query.
      Returns:
      the aggregation, or null for default
    • getPartialAggregation

      net.solarnetwork.domain.datum.Aggregation getPartialAggregation()
      Get an aggregation to apply to partial time ranges if the start or end dates do not align to exact boundaries defined by the aggregation value.

      This filter can be used to request incomplete aggregate results for when the provided start or end dates do not align to exact getAggregation() boundaries. For example if a Aggregation.Month aggregation is requested with a start date of 2020-01-15 and an end date of 2020-03-15, this property could be set to Aggregation.Day to request 3 aggregate month results that are comprised of these date ranges:

      1. 15 Jan - 31 Jan
      2. 1 Feb - 29 Feb
      3. 1 Mar - 14 Mar

      If this property is not provided in that same example, then the results would be comprised of these date ranges:

      1. 1 Jan - 31 Jan
      2. 1 Feb - 29 Feb
      3. 1 Mar - 31 Mar
      Returns:
      the partial aggregation, or null for none
      Since:
      1.1
    • getStartDate

      Instant getStartDate()
      Get a start date.
      Returns:
      the start date
    • getEndDate

      Instant getEndDate()
      Get an end date.
      Returns:
      the end date