com.vaadin.ui.

Interface Grid.FetchItemsCallback<T>

  • Type Parameters:

    T - the grid bean type

    All Superinterfaces:

    Serializable

    Enclosing class:

    Grid<T>

    Functional Interface:

    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface Grid.FetchItemsCallback<T>
    extends Serializable

    A callback method for fetching items. The callback is provided with a list of sort orders, offset index and limit.

    • Method Summary

      All Methods
      Modifier and Type Method Description
      Stream<T> fetchItems​(List<QuerySortOrder> sortOrder, int offset, int limit)

      Returns a stream of items ordered by given sort orders, limiting the results with given offset and limit.

    • Method Detail

      • fetchItems

        Stream<T> fetchItems​(List<QuerySortOrder> sortOrder,
                             int offset,
                             int limit)

        Returns a stream of items ordered by given sort orders, limiting the results with given offset and limit.

        This method is called after the size of the data set is asked from a related size callback. The offset and limit are promised to be within the size of the data set.

        Parameters:

        sortOrder - a list of sort orders

        offset - the first index to fetch

        limit - the fetched item count

        Returns:

        stream of items