com.vaadin.data.sort
Class Sort

java.lang.Object
  extended by com.vaadin.data.sort.Sort
All Implemented Interfaces:
java.io.Serializable

public class Sort
extends java.lang.Object
implements java.io.Serializable

Fluid Sort API. Provides a convenient, human-readable way of specifying multi-column sort order.

Since:
7.4
Author:
Vaadin Ltd
See Also:
Serialized Form

Method Summary
 java.util.List<SortOrder> build()
          Build a sort order list, ready to be passed to Grid
static Sort by(java.lang.Object propertyId)
          Start building a Sort order by sorting a provided column in ascending order.
static Sort by(java.lang.Object propertyId, com.vaadin.shared.data.sort.SortDirection direction)
          Start building a Sort order by sorting a provided column.
 Sort then(java.lang.Object propertyId)
          Continue building a Sort order.
 Sort then(java.lang.Object propertyId, com.vaadin.shared.data.sort.SortDirection direction)
          Continue building a Sort order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

by

public static Sort by(java.lang.Object propertyId)
Start building a Sort order by sorting a provided column in ascending order.

Parameters:
propertyId - a property id, corresponding to a data source property
Returns:
a sort object

by

public static Sort by(java.lang.Object propertyId,
                      com.vaadin.shared.data.sort.SortDirection direction)
Start building a Sort order by sorting a provided column.

Parameters:
propertyId - a property id, corresponding to a data source property
direction - a sort direction value
Returns:
a sort object

then

public Sort then(java.lang.Object propertyId)
Continue building a Sort order. The provided property is sorted in ascending order if the previously added properties have been evaluated as equals.

Parameters:
propertyId - a property id, corresponding to a data source property
Returns:
a sort object

then

public Sort then(java.lang.Object propertyId,
                 com.vaadin.shared.data.sort.SortDirection direction)
Continue building a Sort order. The provided property is sorted in specified order if the previously added properties have been evaluated as equals.

Parameters:
propertyId - a property id, corresponding to a data source property
direction - a sort direction value
Returns:
a sort object

build

public java.util.List<SortOrder> build()
Build a sort order list, ready to be passed to Grid

Returns:
a sort order list.


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.