Package-level declarations

Types

Link copied to clipboard
data class Criteria(val filters: List<Filter> = listOf(), val orderBy: List<OrderBy> = listOf(), val pagination: Pagination = Pagination())
Link copied to clipboard
class CriteriaBuilder(filters: MutableList<Filter> = mutableListOf(), orderBy: MutableList<OrderBy> = mutableListOf(), var page: Int = 1, var pageSize: Int? = null)
Link copied to clipboard
data class Filter(val field: String, val value: Any, val operator: FilterOperator = FilterOperator.EQUALS)
Link copied to clipboard
Link copied to clipboard
enum Order : Enum<Order>
Link copied to clipboard
data class OrderBy(val field: String, val order: Order = Order.ASC)
Link copied to clipboard
data class PaginatedCollection<T>(val items: List<T>, val totalPages: Long, val totalItems: Long, val currentPage: Long)
Link copied to clipboard
data class Pagination(val page: Int = 1, val size: Int? = 25)
Link copied to clipboard
class RequiredFieldException(val message: String? = null) : Exception

Functions

Link copied to clipboard
fun criteria(builder: CriteriaBuilder.() -> Unit): Criteria

Create a new Criteria instance with CriteriaBuilder

Link copied to clipboard
Link copied to clipboard

Create a copy of an existing Criteria and return the copy with the modified one

Link copied to clipboard

Replace any filter by Its field name

Link copied to clipboard