You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.data.provider.

Interface CallbackDataProvider.CountCallback<T,​F>

  • Type Parameters:

    T - the type of the items to count

    F - the type of the optional filter in the query, Void if filtering is not supported

    All Superinterfaces:

    Serializable

    Enclosing class:

    CallbackDataProvider<T,​F>

    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 CallbackDataProvider.CountCallback<T,​F>
    extends Serializable

    Callback interface for counting the number of items in a backend based on a query.

    • Method Summary

      All Methods
      Modifier and Type Method Description
      int count​(Query<T,​F> query)

      Counts the number of available items based on a query.

    • Method Detail

      • count

        int count​(Query<T,​F> query)

        Counts the number of available items based on a query. The query optionally defines any filtering to use through Query.getFilter(). The query also contains information about paging and sorting although that information is generally not applicable for determining the number of items.

        Parameters:

        query - the query that defines which items to count

        Returns:

        the number of available items