|
Spring Data Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.domain.Sort.Order
public static class Sort.Order
PropertyPath implements the pairing of an Sort.Direction and a property. It is used to provide input for
Sort
| Constructor Summary | |
|---|---|
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(Sort.Direction direction,
String property,
Sort.NullHandling nullHandlingHint)
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. |
|
| Method Summary | |
|---|---|
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. |
Sort.NullHandling |
getNullHandling()
Returns the used Sort.NullHandling hint, which can but may not be respected by the used datastore. |
String |
getProperty()
Returns the property to order for. |
int |
hashCode()
|
Sort.Order |
ignoreCase()
Returns a new Sort.Order with case insensitive sorting enabled. |
boolean |
isAscending()
Returns whether sorting for this property shall be ascending. |
boolean |
isIgnoreCase()
Returns whether or not the sort will be case sensitive. |
Sort.Order |
nullsFirst()
Returns a Sort.Order with Sort.NullHandling.NULLS_FIRST as null handling hint. |
Sort.Order |
nullsLast()
Returns a Sort.Order with Sort.NullHandling.NULLS_LAST as null handling hint. |
Sort.Order |
nullsNative()
Returns a Sort.Order with Sort.NullHandling.NATIVE as null handling hint. |
String |
toString()
|
Sort.Order |
with(Sort.Direction order)
Returns a new Sort.Order with the given Sort.Order. |
Sort.Order |
with(Sort.NullHandling nullHandling)
Returns a Sort.Order with the given Sort.NullHandling. |
Sort |
withProperties(String... properties)
Returns a new Sort instance for the given properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Sort.Order(Sort.Direction direction,
String property)
Sort.Order instance. if order is null then order defaults to
Sort.DEFAULT_DIRECTION
direction - can be null, will default to Sort.DEFAULT_DIRECTIONproperty - must not be null or empty.
public Sort.Order(Sort.Direction direction,
String property,
Sort.NullHandling nullHandlingHint)
Sort.Order instance. if order is null then order defaults to
Sort.DEFAULT_DIRECTION
direction - can be null, will default to Sort.DEFAULT_DIRECTIONproperty - must not be null or empty.nullHandling - can be null, will default to Sort.NullHandling.NATIVE.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.| Method Detail |
|---|
@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 boolean isIgnoreCase()
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 -
public Sort.Order ignoreCase()
Sort.Order with case insensitive sorting enabled.
public Sort.Order with(Sort.NullHandling nullHandling)
Sort.Order with the given Sort.NullHandling.
nullHandling - can be null.
public Sort.Order nullsFirst()
Sort.Order with Sort.NullHandling.NULLS_FIRST as null handling hint.
public Sort.Order nullsLast()
Sort.Order with Sort.NullHandling.NULLS_LAST as null handling hint.
public Sort.Order nullsNative()
Sort.Order with Sort.NullHandling.NATIVE as null handling hint.
public Sort.NullHandling getNullHandling()
Sort.NullHandling hint, which can but may not be respected by the used datastore.
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
Spring Data Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||