Interface Order
-
- All Known Implementing Classes:
OrderImpl
public interface Order
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classOrder.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Order.BuilderdefaultBuilder()DirectiongetDirection()Returns the order the property shall be sorted for.NullHandlinggetNullHandling()Returns the usedNullHandlinghint, which can but may not be respected by the used datastore.StringgetProperty()Returns the property to order for.OrderignoreCase()Returns a newOrderwith case insensitive sorting enabled.booleanisAscending()Returns whether sorting for this property shall be ascending.booleanisDescending()Returns whether sorting for this property shall be descending.booleanisIgnoreCase()Returns whether or not the sort will be case sensitive.OrdernullsFirst()Returns aOrderwithNullHandling.NULLS_FIRSTas null handling hint.OrdernullsLast()Returns aOrderwithNullHandling.NULLS_LASTas null handling hint.OrdernullsNative()Returns aOrderwithNullHandling.NATIVEas null handling hint.Orderwith(Direction direction)Orderwith(NullHandling nullHandling)Returns aOrderwith the givenNullHandling.SortingwithProperties(String... properties)Returns a newSortinginstance for the given properties.OrderwithProperty(String property)Returns a newOrder
-
-
-
Method Detail
-
getDirection
Direction getDirection()
Returns the order the property shall be sorted for.- Returns:
- the order the property shall be sorted for
-
getNullHandling
NullHandling getNullHandling()
Returns the usedNullHandlinghint, which can but may not be respected by the used datastore.- Returns:
- the used NullHandling hint, which can but may not be respected by the used datastore.
-
getProperty
String getProperty()
Returns the property to order for.- Returns:
- the property to order for
-
ignoreCase
Order ignoreCase()
Returns a newOrderwith case insensitive sorting enabled.- Returns:
- a new Order with case insensitive sorting enabled
-
isAscending
boolean isAscending()
Returns whether sorting for this property shall be ascending.- Returns:
- whether sorting for this property shall be ascending
-
isDescending
boolean isDescending()
Returns whether sorting for this property shall be descending.- Returns:
- whether sorting for this property shall be descending
-
isIgnoreCase
boolean isIgnoreCase()
Returns whether or not the sort will be case sensitive.- Returns:
- whether or not the sort will be case sensitive
-
nullsFirst
Order nullsFirst()
Returns aOrderwithNullHandling.NULLS_FIRSTas null handling hint.- Returns:
- an Order with NullHandling#NULLS_FIRST as null handling hint
-
nullsLast
Order nullsLast()
Returns aOrderwithNullHandling.NULLS_LASTas null handling hint.- Returns:
- an Order with NullHandling#NULLS_LAST as null handling hint.
-
nullsNative
Order nullsNative()
Returns aOrderwithNullHandling.NATIVEas null handling hint.- Returns:
- an Order with NullHandling#NATIVE as null handling hint.
-
with
Order with(Direction direction)
- Parameters:
direction- given direction- Returns:
- a new Order with the given Direction
-
with
Order with(NullHandling nullHandling)
Returns aOrderwith the givenNullHandling.- Parameters:
nullHandling- can be null.- Returns:
- an Order with the given NullHandling
-
withProperties
Sorting withProperties(String... properties)
Returns a newSortinginstance for the given properties.- Parameters:
properties- given properties- Returns:
- a new SortingImpl for the given properties
-
withProperty
Order withProperty(String property)
Returns a newOrder- Parameters:
property- must not be null or empty.- Returns:
- a new Order
-
defaultBuilder
static Order.Builder defaultBuilder()
-
-