Class DateRangeQuery

java.lang.Object
org.ametys.cms.search.query.AbstractFieldQuery
org.ametys.cms.search.query.DateRangeQuery
All Implemented Interfaces:
Query

public class DateRangeQuery extends AbstractFieldQuery
Represents a Query testing a date range.
  • Field Details

    • _from

      protected AdaptableDate _from
      The lower end of the date range.
    • _to

      protected AdaptableDate _to
      The upper end of the date range.
    • _includeFrom

      protected boolean _includeFrom
      True to include the lower end, false to exclude it.
    • _includeTo

      protected boolean _includeTo
      True to include the upper end, false to exclude it.
  • Constructor Details

    • DateRangeQuery

      public DateRangeQuery(String fieldPath, LocalDate from, LocalDate to)
      Build a date range query.
      Parameters:
      fieldPath - The field path.
      from - The lower end of the range.
      to - The upper end of the range.
    • DateRangeQuery

      public DateRangeQuery(String fieldPath, AdaptableDate from, AdaptableDate to)
      Build a date range query.
      Parameters:
      fieldPath - The field path.
      from - The lower end of the range.
      to - The upper end of the range.
    • DateRangeQuery

      public DateRangeQuery(String fieldPath, LocalDate from, LocalDate to, boolean includeFrom, boolean includeTo)
      Build a date range query.
      Parameters:
      fieldPath - The field path.
      from - The lower end of the range.
      to - The upper end of the range.
      includeFrom - Whether to include the lower end or not.
      includeTo - Whether to include the upper end or not.
    • DateRangeQuery

      public DateRangeQuery(String fieldPath, AdaptableDate from, AdaptableDate to, boolean includeFrom, boolean includeTo)
      Build a date range query.
      Parameters:
      fieldPath - The field path.
      from - The lower end of the range.
      to - The upper end of the range.
      includeFrom - Whether to include the lower end or not.
      includeTo - Whether to include the upper end or not.
  • Method Details