T - the type of items returned by this data provider.public class DataLoaderAdapter<T>
A Vaadin com.vaadin.data.provider.DataProvider implementation which delegates the data-fetching calls to a VoK-ORM DataLoader; an adapter which adapts calls to Vaadin DataProvider to VoK-ORM DataLoader.
| Constructor and Description |
|---|
DataLoaderAdapter(com.github.mvysny.vokdataloader.DataLoader<T> loader,
kotlin.jvm.functions.Function1<? super T,? extends java.lang.Object> idResolver)
A Vaadin com.vaadin.data.provider.DataProvider implementation which delegates the data-fetching calls to a VoK-ORM DataLoader;
an adapter which adapts calls to Vaadin DataProvider to VoK-ORM DataLoader.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.stream.Stream<T> |
fetchFromBackEnd(com.vaadin.data.provider.Query<T,com.github.mvysny.vokdataloader.Filter> query) |
java.lang.Object |
getId(T item) |
com.github.mvysny.vokdataloader.DataLoader<T> |
getLoader()
performs the actual data fetching.
|
int |
sizeInBackEnd(com.vaadin.data.provider.Query<T,com.github.mvysny.vokdataloader.Filter> query) |
java.lang.String |
toString() |
public DataLoaderAdapter(com.github.mvysny.vokdataloader.DataLoader<T> loader,
kotlin.jvm.functions.Function1<? super T,? extends java.lang.Object> idResolver)
A Vaadin com.vaadin.data.provider.DataProvider implementation which delegates the data-fetching calls to a VoK-ORM DataLoader; an adapter which adapts calls to Vaadin DataProvider to VoK-ORM DataLoader.
loader - performs the actual data fetching. All data-fetching calls are delegated here.idResolver - provides unique ID for every item. The ID is then used to differentiate items.See com.vaadin.data.provider.DataProvider.getId for more details. Typically every itemhas a primary key of type Long, but any Java/Kotlin object with properly written Any.equals and Any.hashCode can act as the ID,including the item itself.loader - performs the actual data fetching. All data-fetching calls are delegated here.idResolver - provides unique ID for every item. The ID is then used to differentiate items.
See com.vaadin.data.provider.DataProvider.getId for more details. Typically every item
has a primary key of type Long, but any Java/Kotlin object with properly written Any.equals and Any.hashCode can act as the ID,
including the item itself.public java.lang.Object getId(T item)
public java.lang.String toString()
public int sizeInBackEnd(com.vaadin.data.provider.Query<T,com.github.mvysny.vokdataloader.Filter> query)
public java.util.stream.Stream<T> fetchFromBackEnd(com.vaadin.data.provider.Query<T,com.github.mvysny.vokdataloader.Filter> query)
public com.github.mvysny.vokdataloader.DataLoader<T> getLoader()
performs the actual data fetching.
All data-fetching calls are delegated here.