Package com.vaadin.flow.component.grid
Class GridSortOrderBuilder<T>
java.lang.Object
com.vaadin.flow.data.provider.SortOrderBuilder<GridSortOrder<T>,Grid.Column<T>>
com.vaadin.flow.component.grid.GridSortOrderBuilder<T>
- Type Parameters:
T
- the type of the grid
- All Implemented Interfaces:
Serializable
Helper classes with fluent API for constructing
GridSortOrder
lists.
When the sort order is ready to be passed on, calling SortOrderBuilder.build()
will
create the list of sort orders.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected GridSortOrder<T>
createSortOrder
(Grid.Column<T> by, SortDirection direction) Creates a sort order object with the given parameters.thenAsc
(Grid.Column<T> by) Appends sorting with ascending sort direction.thenDesc
(Grid.Column<T> by) Appends sorting with descending sort direction.Methods inherited from class com.vaadin.flow.data.provider.SortOrderBuilder
build
-
Constructor Details
-
GridSortOrderBuilder
public GridSortOrderBuilder()
-
-
Method Details
-
thenAsc
Description copied from class:SortOrderBuilder
Appends sorting with ascending sort direction.- Overrides:
thenAsc
in classSortOrderBuilder<GridSortOrder<T>,
Grid.Column<T>> - Parameters:
by
- the object to sort by- Returns:
- this sort builder
-
thenDesc
Description copied from class:SortOrderBuilder
Appends sorting with descending sort direction.- Overrides:
thenDesc
in classSortOrderBuilder<GridSortOrder<T>,
Grid.Column<T>> - Parameters:
by
- the object to sort by- Returns:
- this sort builder
-
createSortOrder
Description copied from class:SortOrderBuilder
Creates a sort order object with the given parameters.- Specified by:
createSortOrder
in classSortOrderBuilder<GridSortOrder<T>,
Grid.Column<T>> - Parameters:
by
- the object to sort bydirection
- the sort direction- Returns:
- the sort order object
-