public static class Sort.Order extends Object implements Serializable
Sort.Direction and a property. It is used to provide input for
Sort| Constructor and Description |
|---|
Sort.Order(Sort.Direction direction,
String property)
Creates a new
Sort.Order instance. if order is null then order defaults to
Sort.DEFAULT_DIRECTION |
Sort.Order(String property)
Creates a new
Sort.Order instance. |
| Modifier and Type | Method and Description |
|---|---|
static List<Sort.Order> |
create(Sort.Direction direction,
Iterable<String> properties)
Deprecated.
use
Sort.Sort(Direction, List) instead. |
boolean |
equals(Object obj) |
Sort.Direction |
getDirection()
Returns the order the property shall be sorted for.
|
String |
getProperty()
Returns the property to order for.
|
int |
hashCode() |
boolean |
isAscending()
Returns whether sorting for this property shall be ascending.
|
String |
toString() |
Sort.Order |
with(Sort.Direction order)
Returns a new
Sort.Order with the given Sort.Order. |
Sort |
withProperties(String... properties)
Returns a new
Sort instance for the given properties. |
public Sort.Order(Sort.Direction direction, String property)
Sort.Order instance. if order is null then order defaults to
Sort.DEFAULT_DIRECTIONdirection - can be null, will default to Sort.DEFAULT_DIRECTIONproperty - must not be null or empty.public Sort.Order(String property)
Sort.Order instance. Takes a single property. Direction defaults to
Sort.DEFAULT_DIRECTION.property - must not be null or empty.@Deprecated public static List<Sort.Order> create(Sort.Direction direction, Iterable<String> properties)
Sort.Sort(Direction, List) instead.public Sort.Direction getDirection()
public String getProperty()
public boolean isAscending()
public Sort.Order with(Sort.Direction order)
Sort.Order with the given Sort.Order.order - public Sort withProperties(String... properties)
Sort instance for the given properties.properties - Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.