Package org.xwiki.livedata
Class LiveDataQuery
- java.lang.Object
-
- org.xwiki.livedata.LiveDataQuery
-
public class LiveDataQuery extends Object
The query used to get the live data.- Since:
- 12.10
- Version:
- $Id: d9ad3377bfe8bd39eba8f90d2ea23d04aba1d63c $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LiveDataQuery.Constraint
A constraint to apply to a property value.static class
LiveDataQuery.Filter
A set of constraints to apply to a given property.static class
LiveDataQuery.SortEntry
A sort entry.static class
LiveDataQuery.Source
Specifies where to take the data from.
-
Constructor Summary
Constructors Constructor Description LiveDataQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<LiveDataQuery.Filter>
getFilters()
Integer
getLimit()
Long
getOffset()
List<String>
getProperties()
List<LiveDataQuery.SortEntry>
getSort()
LiveDataQuery.Source
getSource()
void
initialize()
Preventnull
values where it's possible.void
setFilters(List<LiveDataQuery.Filter> filters)
Sets the filters to apply on property values.void
setLimit(Integer limit)
Sets the number of entries to fetch (the page size).void
setOffset(Long offset)
Sets the index where the current page of entries starts.void
setProperties(List<String> properties)
Sets the list of properties to fetch.void
setSort(List<LiveDataQuery.SortEntry> sort)
Sets the list of properties to sort on.void
setSource(LiveDataQuery.Source source)
Specifies the live data source to take the data from.
-
-
-
Method Detail
-
getOffset
public Long getOffset()
- Returns:
- the index where the current page of entries starts
-
setOffset
public void setOffset(Long offset)
Sets the index where the current page of entries starts.- Parameters:
offset
- the new offset
-
getLimit
public Integer getLimit()
- Returns:
- the number of entries to fetch (the page size)
-
setLimit
public void setLimit(Integer limit)
Sets the number of entries to fetch (the page size).- Parameters:
limit
- the new limit
-
getProperties
public List<String> getProperties()
- Returns:
- the list of properties whose values we want to fetch
-
setProperties
public void setProperties(List<String> properties)
Sets the list of properties to fetch.- Parameters:
properties
- the list of properties to fetch
-
getSource
public LiveDataQuery.Source getSource()
- Returns:
- where to take the data from
-
setSource
public void setSource(LiveDataQuery.Source source)
Specifies the live data source to take the data from.- Parameters:
source
- the new live data source configuration
-
getFilters
public List<LiveDataQuery.Filter> getFilters()
- Returns:
- the filters to apply on the property values
-
setFilters
public void setFilters(List<LiveDataQuery.Filter> filters)
Sets the filters to apply on property values.- Parameters:
filters
- the new filters to apply on property values
-
getSort
public List<LiveDataQuery.SortEntry> getSort()
- Returns:
- the list of properties to sort on, along with their corresponding sort direction
-
setSort
public void setSort(List<LiveDataQuery.SortEntry> sort)
Sets the list of properties to sort on.- Parameters:
sort
- the list of properties to sort on
-
initialize
public void initialize()
Preventnull
values where it's possible.
-
-