com.vaadin.data.provider.
Class Sort.SortBuilder
- java.lang.Object
-
- com.vaadin.data.provider.Sort.SortBuilder
-
All Implemented Interfaces:
Enclosing class:
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, calling
build()
will create the list of sort ordersSee Also:
Sort
,Sort.asc(String)
,Sort.desc(String)
,build()
, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SortBuilder()
Constructs an empty SortBuilder.
-
Method Summary
All Methods Modifier and Type Method Description protected Sort.SortBuilder
append(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.SortBuilder
thenAsc(String by)
Appends sorting with ascending sort direction.
Sort.SortBuilder
thenDesc(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 byReturns:
this sort builder
-
thenDesc
public Sort.SortBuilder thenDesc(String by)
Appends sorting with descending sort direction.
Parameters:
by
- the object to sort byReturns:
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 directionReturns:
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
-
-