Package com.inmethod.grid
Interface IGridSortState<S>
-
- All Known Implementing Classes:
GridSortState
public interface IGridSortState<S>
Allows to query the sort state of a grid. Sort state determines by which properties and in what direction the data should be sorted. This interface allows data to be sorted by multiple properties at the same time.Example of use:
IGridSortState state = ... // acquire sort state if (state.getColumns().isEmpty() == false) { // at least one column is being sorted ISortStateColumn column = state.getColumns().get(0); // get the one with highest priority // property name is what IGridColumn.getSortProperty() returns String propertyName property = column.getPropertyName(); // direction is either ASC or DESC IGridSortState.Direction direction = column.getDirection(); }
- Author:
- Matej Knopp
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IGridSortState.Direction
The direction.static interface
IGridSortState.ISortStateColumn<S>
Pair of property name andIGridSortState.Direction
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<IGridSortState.ISortStateColumn<S>>
getColumns()
Returns the sort state values for various columns sorted by column priority.AbstractGrid<?,?,S>
getGrid()
-
-
-
Method Detail
-
getGrid
AbstractGrid<?,?,S> getGrid()
- Returns:
- the related grid, not null
-
getColumns
List<IGridSortState.ISortStateColumn<S>> getColumns()
Returns the sort state values for various columns sorted by column priority. Columns with higher priority are placed before (have lower index than) columns with lower priority.If your business logic supports sorting on one property only, you should sort by the first entry in the result list.
- Returns:
- list of
IGridSortState.ISortStateColumn
instances that determines the sort state of grid
-
-