com.github.mvysny.karibudsl.v8.DataProviderUtils.kt Maven / Gradle / Ivy
package com.github.mvysny.karibudsl.v8
import com.vaadin.data.provider.DataProvider
import com.vaadin.data.provider.Query
import com.vaadin.data.provider.QuerySortOrder
import com.vaadin.shared.data.sort.SortDirection
import kotlin.reflect.KProperty1
import kotlin.streams.toList
/**
* Returns all items provided by this data provider as an eager list. Careful with larger data!
*/
public fun DataProvider.getAll(): List = fetch(Query()).toList()
public val KProperty1.asc: QuerySortOrder get() = QuerySortOrder(name, SortDirection.ASCENDING)
public val KProperty1.desc: QuerySortOrder get() = QuerySortOrder(name, SortDirection.DESCENDING)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy