Class DateRangeQuery
- java.lang.Object
-
- com.atlassian.confluence.search.v2.query.DateRangeQuery
-
- All Implemented Interfaces:
Expandable<SearchQuery>,SearchQuery
public class DateRangeQuery extends Object implements SearchQuery
Query for search results that have been modified within the specified range of dates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDateRangeQuery.BuilderHelps create aDateRangeQueryobjectstatic classDateRangeQuery.DateRangeDeprecated.since 5.10, useRangeinsteadstatic classDateRangeQuery.DateRangeQueryType
-
Constructor Summary
Constructors Constructor Description DateRangeQuery(@Nullable Date from, @Nullable Date to, boolean includeFrom, boolean includeTo, DateRangeQuery.DateRangeQueryType dateRangeQueryType)Query for search results that have been modified within the specified range of dates.DateRangeQuery(DateRangeQuery.DateRange dateRange, DateRangeQuery.DateRangeQueryType dateRangeQueryType)Query for search results that have been modified within the specified range of dates.DateRangeQuery(Date fromDate, Date toDate, boolean includeFrom, boolean includeTo, String fieldName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)SearchQueryexpand()Expands this query into a composite query (that composes other queries).Optional<String>fieldName()DategetFromDate()StringgetKey()ListgetParameters()List of parameters asStrings orSearchQuerys.DategetToDate()inthashCode()booleanisIncludeFrom()booleanisIncludeTo()static DateRangeQuery.BuildernewDateRangeQuery(DateRangeQuery.DateRangeQueryType type)static DateRangeQuery.BuildernewDateRangeQuery(String fieldName)Optional<DateRangeQuery.DateRangeQueryType>queryType()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.search.v2.SearchQuery
getBoost, getSubClauses
-
-
-
-
Constructor Detail
-
DateRangeQuery
public DateRangeQuery(@Nullable Date from, @Nullable Date to, boolean includeFrom, boolean includeTo, DateRangeQuery.DateRangeQueryType dateRangeQueryType)
Query for search results that have been modified within the specified range of dates.- Parameters:
from- the beginning of the date range (can be null)to- the end date in the range (can be null)includeFrom- include the beginning date in the rangeincludeTo- include the end date in the rangedateRangeQueryType- the type of range query. SeeDateRangeQuery.DateRangeQueryType
-
DateRangeQuery
public DateRangeQuery(Date fromDate, Date toDate, boolean includeFrom, boolean includeTo, String fieldName)
-
DateRangeQuery
public DateRangeQuery(DateRangeQuery.DateRange dateRange, DateRangeQuery.DateRangeQueryType dateRangeQueryType)
Query for search results that have been modified within the specified range of dates.- Parameters:
dateRange- the dateRange. SeeDateRangeQuery.DateRangedateRangeQueryType- the type of range query. SeeDateRangeQuery.DateRangeQueryType
-
-
Method Detail
-
newDateRangeQuery
public static DateRangeQuery.Builder newDateRangeQuery(DateRangeQuery.DateRangeQueryType type)
-
newDateRangeQuery
public static DateRangeQuery.Builder newDateRangeQuery(String fieldName)
-
getKey
public String getKey()
- Specified by:
getKeyin interfaceSearchQuery- Returns:
- the plugin key
-
getParameters
public List getParameters()
Description copied from interface:SearchQueryList of parameters asStrings orSearchQuerys.- Specified by:
getParametersin interfaceSearchQuery- Returns:
Strings orSearchQuerys.
-
getFromDate
public Date getFromDate()
-
getToDate
public Date getToDate()
-
isIncludeFrom
public boolean isIncludeFrom()
-
isIncludeTo
public boolean isIncludeTo()
-
queryType
public Optional<DateRangeQuery.DateRangeQueryType> queryType()
- Since:
- 7.0.1
-
expand
public SearchQuery expand()
Description copied from interface:SearchQueryExpands this query into a composite query (that composes other queries). By overriding this method, one can specify a new query that is composition of the behaviour of the composed queries.- Specified by:
expandin interfaceExpandable<SearchQuery>- Specified by:
expandin interfaceSearchQuery- Returns:
- a query
-
-