| Constructor and Description |
|---|
OrderImpl() |
OrderImpl(Direction direction,
String property)
Creates a new
Order instance. |
OrderImpl(Direction direction,
String property,
NullHandling nullHandlingHint)
Creates a new
Order instance. |
OrderImpl(String property)
Creates a new
Order instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Direction |
getDirection()
Returns the order the property shall be sorted for.
|
NullHandling |
getNullHandling()
Returns the used
NullHandling hint, which can but may not be respected by the used datastore. |
String |
getProperty()
Returns the property to order for.
|
int |
hashCode() |
Order |
ignoreCase()
Returns a new
Order with case insensitive sorting enabled. |
boolean |
isAscending()
Returns whether sorting for this property shall be ascending.
|
boolean |
isDescending()
Returns whether sorting for this property shall be descending.
|
boolean |
isIgnoreCase()
Returns whether or not the sort will be case sensitive.
|
Order |
nullsFirst()
Returns a
Order with NullHandling.NULLS_FIRST as null handling hint. |
Order |
nullsLast()
Returns a
Order with NullHandling.NULLS_LAST as null handling hint. |
Order |
nullsNative()
Returns a
Order with NullHandling.NATIVE as null handling hint. |
void |
setDirection(Direction direction) |
void |
setIgnoreCase(boolean ignoreCase) |
void |
setNullHandling(NullHandling nullHandling) |
void |
setProperty(String property) |
String |
toString() |
Order |
with(Direction direction)
|
Order |
with(NullHandling nullHandling)
Returns a
Order with the given NullHandling. |
Sorting |
withProperties(String... properties)
Returns a new
Sorting instance for the given properties. |
Order |
withProperty(String property)
Returns a new
Order |
public OrderImpl()
public OrderImpl(Direction direction, String property)
Order instance. if order is null then order defaults to
Sorting.DEFAULT_DIRECTIONdirection - can be null, will default to Sorting.DEFAULT_DIRECTIONproperty - must not be null or empty.public OrderImpl(Direction direction, String property, NullHandling nullHandlingHint)
Order instance. if order is null then order defaults to
Sorting.DEFAULT_DIRECTIONdirection - can be null, will default to Sorting.DEFAULT_DIRECTIONproperty - must not be null or empty.nullHandlingHint - can be null, will default to NullHandling.NATIVE.public OrderImpl(String property)
Order instance. Takes a single property. Direction defaults to
Sorting.DEFAULT_DIRECTION.property - must not be null or empty.public void setDirection(Direction direction)
public void setIgnoreCase(boolean ignoreCase)
public void setNullHandling(NullHandling nullHandling)
public void setProperty(String property)
public Direction getDirection()
getDirection in interface Orderpublic NullHandling getNullHandling()
NullHandling hint, which can but may not be respected by the used datastore.getNullHandling in interface Orderpublic String getProperty()
getProperty in interface Orderpublic Order ignoreCase()
Order with case insensitive sorting enabled.ignoreCase in interface Orderpublic boolean isAscending()
isAscending in interface Orderpublic boolean isDescending()
isDescending in interface Orderpublic boolean isIgnoreCase()
isIgnoreCase in interface Orderpublic Order nullsFirst()
Order with NullHandling.NULLS_FIRST as null handling hint.nullsFirst in interface Orderpublic Order nullsLast()
Order with NullHandling.NULLS_LAST as null handling hint.public Order nullsNative()
Order with NullHandling.NATIVE as null handling hint.nullsNative in interface Orderpublic Order with(NullHandling nullHandling)
Order with the given NullHandling.public Sorting withProperties(String... properties)
Sorting instance for the given properties.withProperties in interface Orderproperties - given propertiespublic Order withProperty(String property)
OrderwithProperty in interface Orderproperty - must not be null or empty.Copyright © 2018. All rights reserved.