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 class
DateRangeQuery.Builder
Helps create aDateRangeQuery
objectstatic class
DateRangeQuery.DateRange
Deprecated.since 5.10, useRange
insteadstatic class
DateRangeQuery.DateRangeQueryType
-
Field Summary
-
Fields inherited from interface com.atlassian.confluence.search.v2.SearchQuery
DEFAULT_BOOST
-
-
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 boolean
equals(Object obj)
SearchQuery
expand()
Expands this query into a composite query (that composes other queries).Optional<String>
fieldName()
Date
getFromDate()
String
getKey()
List
getParameters()
List of parameters asString
s orSearchQuery
s.Date
getToDate()
int
hashCode()
boolean
isIncludeFrom()
boolean
isIncludeTo()
static DateRangeQuery.Builder
newDateRangeQuery(DateRangeQuery.DateRangeQueryType type)
static DateRangeQuery.Builder
newDateRangeQuery(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.DateRange
dateRangeQueryType
- 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:
getKey
in interfaceSearchQuery
- Returns:
- the plugin key
-
getParameters
public List getParameters()
Description copied from interface:SearchQuery
List of parameters asString
s orSearchQuery
s.- Specified by:
getParameters
in interfaceSearchQuery
- Returns:
String
s orSearchQuery
s.
-
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:SearchQuery
Expands 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:
expand
in interfaceExpandable<SearchQuery>
- Specified by:
expand
in interfaceSearchQuery
- Returns:
- a query
-
-