Package com.vaadin.data.provider
Class Sort.SortBuilder
- java.lang.Object
-
- com.vaadin.data.provider.Sort.SortBuilder
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Sort
public static class Sort.SortBuilder extends Object implements Serializable
SortBuilder is a helper class with fluent API for constructing sort order lists. When the sort order is ready to be passed on, callingbuild()will create the list of sort orders- See Also:
Sort,Sort.asc(String),Sort.desc(String),build(), Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSortBuilder()Constructs an empty SortBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Sort.SortBuilderappend(String by, SortDirection direction)Appends sorting with given sort direction.List<QuerySortOrder>build()Returns an unmodifiable list of the current sort order in this sort builder.Sort.SortBuilderthenAsc(String by)Appends sorting with ascending sort direction.Sort.SortBuilderthenDesc(String by)Appends sorting with descending sort direction.
-
-
-
Method Detail
-
thenAsc
public Sort.SortBuilder thenAsc(String by)
Appends sorting with ascending sort direction.- Parameters:
by- the object to sort by- Returns:
- this sort builder
-
thenDesc
public Sort.SortBuilder thenDesc(String by)
Appends sorting with descending sort direction.- Parameters:
by- the object to sort by- Returns:
- this sort builder
-
append
protected Sort.SortBuilder append(String by, SortDirection direction)
Appends sorting with given sort direction.- Parameters:
by- the object to sort bydirection- the sort direction- Returns:
- this sort builder
-
build
public List<QuerySortOrder> build()
Returns an unmodifiable list of the current sort order in this sort builder.- Returns:
- the unmodifiable sort order list
-
-