Constructor and Description |
---|
QueryDataset(Variant.ScopedClosureVariant closure,
ExecutionContext executionContext) |
Modifier and Type | Method and Description |
---|---|
Type |
getItemType()
Returns the type of data returned by the load functions.
|
boolean |
isFilterSupported(Filter filter)
True if given filter criterion is supported.
|
boolean |
isSortSupported(ISort criterion)
True if given sort criterion is supported.
|
List<Object> |
load(int startIndex,
int count)
Load batch of items, mostly records or simple types.
|
void |
setFilter(Set<Filter> filters)
Sets the new filtering criteria.
|
void |
setSort(SortSpec sort)
Sets the new sorting criteria.
|
int |
size()
Gets number of items available through this query.
|
public QueryDataset(Variant.ScopedClosureVariant closure, ExecutionContext executionContext)
public boolean isSortSupported(ISort criterion)
IDataset
isSortSupported
in interface IDataset
criterion
- the criterion, not null.public boolean isFilterSupported(Filter filter)
IDataset
isFilterSupported
in interface IDataset
filter
- the filter, not null.public void setSort(SortSpec sort)
IDataset
ISort
and
must ignore sort criteria classes of unknown/unsupported types. Next call to IDataset.load(int, int)
must return sorted filtered data.public void setFilter(Set<Filter> filters)
IDataset
ISort
and
must ignore filter criteria classes of unknown/unsupported types. Next call to IDataset.load(int, int)
must return properly filtered data.public List<Object> load(int startIndex, int count)
IDataset
IDataset.setSort(SortSpec)
and/or IDataset.setFilter(java.util.Set)
respectively.load
in interface IDataset
startIndex
- Starting index of the item list, must be 0 or greater.count
- Count of the items to be retrieved, must be 0 or greater.RecordHolder
s. Should never fail with out of bounds exception
- if the startIndex or count is out of bounds, the item is simply not returned. The list may or may not be mutable.public int size()
IDataset
public Type getItemType()
IDataset
getItemType
in interface IDataset
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.