public class VokDataProviderKt
| Modifier and Type | Method and Description |
|---|---|
static <T> com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> |
sortedBy(com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> $receiver,
com.vaadin.data.provider.QuerySortOrder sort)
Returns a new data provider which delegates to receiver but with given list of sort orders appended to anything passed in to com.vaadin.data.provider.Query.
The com.vaadin.data.provider.Query.sortOrders take precedence: any user-specified sorting in Grid takes precedence.
|
static <T> com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> |
withConfigurableFilter2(com.vaadin.data.provider.DataProvider<T,? super com.github.mvysny.vokdataloader.Filter<T>> $receiver)
Wraps this data provider in a configurable filter, regardless of whether this data provider is already a configurable filter or not.
|
static <T> com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> |
withFilter(com.vaadin.data.provider.DataProvider<T,? super com.github.mvysny.vokdataloader.Filter<T>> $receiver,
com.github.mvysny.vokdataloader.Filter<T> other)
Produces a new data provider which always applies given other filter and restricts rows returned by the original data provider to given filter.
|
static <T> com.vaadin.data.provider.DataProvider<T,java.lang.String> |
withStringFilterOn(com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> $receiver,
kotlin.reflect.KProperty1<T,java.lang.String> property)
Creates a data provider which performs string filtering on given property. Ideal for ComboBox which lazily
filters items as the user types in search phrase. Emits ILikeFilter to the receiver.
|
static <T> com.vaadin.data.provider.DataProvider<T,java.lang.String> |
withStringFilterOn(com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> $receiver,
java.lang.String property)
Creates a data provider which performs string filtering on given property. Ideal for ComboBox which lazily
filters items as the user types in search phrase. Emits ILikeFilter to the receiver.
|
public static <T> com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> withConfigurableFilter2(com.vaadin.data.provider.DataProvider<T,? super com.github.mvysny.vokdataloader.Filter<T>> $receiver)
Wraps this data provider in a configurable filter, regardless of whether this data provider is already a configurable filter or not.
public static <T> com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> withFilter(com.vaadin.data.provider.DataProvider<T,? super com.github.mvysny.vokdataloader.Filter<T>> $receiver,
com.github.mvysny.vokdataloader.Filter<T> other)
Produces a new data provider which always applies given other filter and restricts rows returned by the original data provider to given filter.
Invoking this method multiple times will chain the data providers and restrict the rows further.
other - applies this filterpublic static <T> com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> sortedBy(com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> $receiver,
com.vaadin.data.provider.QuerySortOrder sort)
Returns a new data provider which delegates to receiver but with given list of sort orders appended to anything passed in to com.vaadin.data.provider.Query. The com.vaadin.data.provider.Query.sortOrders take precedence: any user-specified sorting in Grid takes precedence.
This can thus be used to specify the default ordering of the data source in case when the user selected no sorting for the Grid.
Cannot be used on in-memory data provider - this function will throw IllegalArgumentException if receiver is an in-memory data provider.
Example of usage: grid.dataProvider = Person.dataProvider.sortedBy(Person::name.asc)
sort - append these sort criteria. May be empty - in that case just returns the receiver.public static <T> com.vaadin.data.provider.DataProvider<T,java.lang.String> withStringFilterOn(com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> $receiver,
kotlin.reflect.KProperty1<T,java.lang.String> property)
Creates a data provider which performs string filtering on given property. Ideal for ComboBox which lazily filters items as the user types in search phrase. Emits ILikeFilter to the receiver.
public static <T> com.vaadin.data.provider.DataProvider<T,java.lang.String> withStringFilterOn(com.vaadin.data.provider.ConfigurableFilterDataProvider<T,com.github.mvysny.vokdataloader.Filter,com.github.mvysny.vokdataloader.Filter> $receiver,
java.lang.String property)
Creates a data provider which performs string filtering on given property. Ideal for ComboBox which lazily filters items as the user types in search phrase. Emits ILikeFilter to the receiver.