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 classLiveDataQuery.ConstraintA constraint to apply to a property value.static classLiveDataQuery.FilterA set of constraints to apply to a given property.static classLiveDataQuery.SortEntryA sort entry.static classLiveDataQuery.SourceSpecifies 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()IntegergetLimit()LonggetOffset()List<String>getProperties()List<LiveDataQuery.SortEntry>getSort()LiveDataQuery.SourcegetSource()voidinitialize()Preventnullvalues where it's possible.voidsetFilters(List<LiveDataQuery.Filter> filters)Sets the filters to apply on property values.voidsetLimit(Integer limit)Sets the number of entries to fetch (the page size).voidsetOffset(Long offset)Sets the index where the current page of entries starts.voidsetProperties(List<String> properties)Sets the list of properties to fetch.voidsetSort(List<LiveDataQuery.SortEntry> sort)Sets the list of properties to sort on.voidsetSource(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()
Preventnullvalues where it's possible.
-
-