com.github.mvysny.karibudsl.v8.DataProviderUtils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of karibu-dsl-v8 Show documentation
Show all versions of karibu-dsl-v8 Show documentation
Karibu-DSL, Kotlin extensions/DSL for Vaadin
The newest version!
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