public class SortingImpl extends Object implements Sorting
Sorting.DEFAULT_DIRECTION.
See Spring Data Commons, but more flat design and independent of Spring libraries.DEFAULT_DIRECTION| Constructor and Description |
|---|
SortingImpl() |
SortingImpl(Direction direction,
List<String> properties)
Creates a new
Sorting instance. |
SortingImpl(Direction direction,
String... properties)
Creates a new
Sorting instance. |
SortingImpl(List<Order> orders)
Creates a new
Sorting instance. |
SortingImpl(Order... orders)
|
SortingImpl(String... properties)
Creates a new
Sorting instance. |
| Modifier and Type | Method and Description |
|---|---|
Sorting |
and(Sorting sort)
Returns a new
SortingImpl consisting of the Orders of the current SortingImpl combined with the given
ones. |
boolean |
equals(Object obj) |
Order |
getOrderFor(String property)
Returns the order registered for the given property.
|
List<Order> |
getOrders() |
int |
hashCode() |
Iterator<Order> |
iterator() |
void |
setOrders(List<Order> orders) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic SortingImpl()
public SortingImpl(Order... orders)
orders - must not be null.public SortingImpl(List<Order> orders)
Sorting instance.orders - must not be null or contain null.public SortingImpl(String... properties)
Sorting instance. Order defaults to Direction#ASC.properties - must not be null or contain null or empty stringspublic SortingImpl(Direction direction, String... properties)
Sorting instance.direction - defaults to Sorting.DEFAULT_DIRECTION (for null cases, too)properties - must not be null, empty or contain null or empty strings.public SortingImpl(Direction direction, List<String> properties)
Sorting instance.direction - defaults to Sorting.DEFAULT_DIRECTION (for null cases, too)properties - must not be null or contain null or empty strings.public Sorting and(Sorting sort)
SortingImpl consisting of the Orders of the current SortingImpl combined with the given
ones.public Order getOrderFor(String property)
getOrderFor in interface Sortingproperty - given propertyCopyright © 2018. All rights reserved.