Class SpringPageableDataProvider<T,F>

java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<T,F>
com.vaadin.flow.data.provider.AbstractBackEndDataProvider<T,F>
org.vaadin.addons.antlerflow.grid.dataprovider.SpringPageableDataProvider<T,F>
Type Parameters:
T - the type of the data items to provide
F - the type of the filter used for querying the data
All Implemented Interfaces:
com.vaadin.flow.data.provider.BackEndDataProvider<T,F>, com.vaadin.flow.data.provider.DataProvider<T,F>, Serializable

public class SpringPageableDataProvider<T,F> extends com.vaadin.flow.data.provider.AbstractBackEndDataProvider<T,F>
A data provider for Vaadin that integrates with Spring Data's a pageable mechanism to retrieve and cache paginated data through a backend service.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpringPageableDataProvider(BiFunction<Optional<F>, org.springframework.data.domain.Pageable, org.springframework.data.domain.Page<T>> dataSupplier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Stream<T>
    fetchFromBackEnd(com.vaadin.flow.data.provider.Query<T,F> query)
     
     
    void
     
    void
    setFilter(F filter)
     
    protected int
    sizeInBackEnd(com.vaadin.flow.data.provider.Query<T,F> query)
     
    protected String
    stableSortString(List<com.vaadin.flow.data.provider.QuerySortOrder> sortOrders)
     
    protected String
     

    Methods inherited from class com.vaadin.flow.data.provider.AbstractBackEndDataProvider

    fetch, setSortOrders, size

    Methods inherited from class com.vaadin.flow.data.provider.AbstractDataProvider

    addDataProviderListener, addListener, fireEvent, refreshItem, refreshItem

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.data.provider.BackEndDataProvider

    isInMemory, setSortOrder, setSortOrders

    Methods inherited from interface com.vaadin.flow.data.provider.DataProvider

    addDataProviderListener, getId, refreshItem, refreshItem, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
  • Constructor Details

    • SpringPageableDataProvider

      public SpringPageableDataProvider(BiFunction<Optional<F>, org.springframework.data.domain.Pageable, org.springframework.data.domain.Page<T>> dataSupplier)
  • Method Details

    • getFilter

      public F getFilter()
    • setFilter

      public void setFilter(F filter)
    • fetchFromBackEnd

      protected Stream<T> fetchFromBackEnd(com.vaadin.flow.data.provider.Query<T,F> query)
      Specified by:
      fetchFromBackEnd in class com.vaadin.flow.data.provider.AbstractBackEndDataProvider<T,F>
    • sizeInBackEnd

      protected int sizeInBackEnd(com.vaadin.flow.data.provider.Query<T,F> query)
      Specified by:
      sizeInBackEnd in class com.vaadin.flow.data.provider.AbstractBackEndDataProvider<T,F>
    • refreshAll

      public void refreshAll()
      Specified by:
      refreshAll in interface com.vaadin.flow.data.provider.DataProvider<T,F>
      Overrides:
      refreshAll in class com.vaadin.flow.data.provider.AbstractDataProvider<T,F>
    • stableSortString

      protected String stableSortString(List<com.vaadin.flow.data.provider.QuerySortOrder> sortOrders)
    • stableString

      protected String stableString(Object o)