public interface GridDataSource
Grid
component (and its sub-components) gain access to
the row data that is displayed on the page. In many cases, this is just a wrapper around a simple List, but the
abstractions exist to support access to a large data set that is accessible in sections.Modifier and Type | Method and Description |
---|---|
int |
getAvailableRows()
Returns the number of rows available in the data source.
|
default int |
getAvailableRows(int limit)
Return the number of rows available in the data source with an upper limit.
|
Class |
getRowType()
Returns the type of value in the rows, or null if not known.
|
Object |
getRowValue(int index)
Returns the row value at the provided index.
|
default boolean |
isEmpty()
Return whether the data source is empty, i.e.
|
void |
prepare(int startIndex,
int endIndex,
List<SortConstraint> sortConstraints)
Invoked to allow the source to prepare to present values.
|
default boolean isEmpty()
default int getAvailableRows(int limit)
limit
- the upper limitlimit
, whichever is lowerint getAvailableRows()
void prepare(int startIndex, int endIndex, List<SortConstraint> sortConstraints)
startIndex
- the starting index to be retrievedendIndex
- the ending index to be retrievedsortConstraints
- identify how data is to be sortedObject getRowValue(int index)
getAvailableRows()
may return a different number of rows than are actually available (i.e., the database
was changed between calls to getAvailableRows()
and the call to prepare(int, int,
java.util.List)
). In that case, this method should return null for any out-of-range indexes.Class getRowType()
BeanModel
when no such model is explicitly provided.5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.