PageFilter

class PageFilter(name: String?, availablePageSizes: List<Int>, defaultPageSize: Int?, maxHits: Int) : Filter<PageFilterContext, PageFilterResult>

PageFilter allows to paginate search query results.

Parameters

name
availablePageSizes
  • list of available of per page variants

defaultPageSize
  • default number of hits per page

maxHits
  • maximum number of hits to available for a pagination

Constructors

PageFilter
Link copied to clipboard
fun PageFilter(name: String? = null, availablePageSizes: List<Int> = DEFAULT_AVAILABLE_PAGE_SIZES, defaultPageSize: Int? = null, maxHits: Int = DEFAULT_MAX_HITS)

Types

Companion
Link copied to clipboard
object Companion

Functions

prepare
Link copied to clipboard
open override fun prepare(name: String, params: QueryFilterParams): PageFilterContext
Parses params and prepares the PageFilter for applying.
provideDelegate
Link copied to clipboard
operator fun provideDelegate(thisRef: QueryFilters, property: KProperty<*>): <ERROR CLASS><QueryFilters, BoundFilter<C, R>>

Properties

availablePageSizes
Link copied to clipboard
val availablePageSizes: List<Int>
  • list of available of per page variants

defaultPageSize
Link copied to clipboard
val defaultPageSize: Int
maxHits
Link copied to clipboard
val maxHits: Int
  • maximum number of hits to available for a pagination