public class GenericDataset extends Object implements IDataset
InMemoryDatasetFilter
if you need sorting and filtering.| Constructor and Description |
|---|
GenericDataset(Variant.ScopedClosureVariant closure) |
| 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 GenericDataset(Variant.ScopedClosureVariant closure)
public int size()
IDatasetpublic List<Object> load(int startIndex, int count)
IDatasetIDataset.setSort(SortSpec) and/or IDataset.setFilter(java.util.Set) respectively.load in interface IDatasetstartIndex - Starting index of the item list, must be 0 or greater.count - Count of the items to be retrieved, must be 0 or greater.RecordHolders. 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 void setSort(SortSpec sort)
IDatasetISort 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)
IDatasetISort and
must ignore filter criteria classes of unknown/unsupported types. Next call to IDataset.load(int, int) must return properly filtered data.public boolean isSortSupported(ISort criterion)
IDatasetisSortSupported in interface IDatasetcriterion - the criterion, not null.public boolean isFilterSupported(Filter filter)
IDatasetisFilterSupported in interface IDatasetfilter - the filter, not null.public Type getItemType()
IDatasetgetItemType in interface IDatasetCopyright © 2007-2018 Whitestein Technologies. All Rights Reserved.