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
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.java.lang.StringgetProperty()Returns the property to order for.java.util.Optional<java.lang.String>getSubProperty()Returns the optional sub 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(java.lang.String... properties)Returns a newSortinginstance for the given properties.OrderwithProperty(java.lang.String property)Returns a newOrder
-
Method Details
-
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
java.lang.String getProperty()Returns the property to order for.- Returns:
- the property to order for
-
getSubProperty
java.util.Optional<java.lang.String> getSubProperty()Returns the optional sub property to order for.A sub property is always related to the main property.
- Returns:
- the optional sub 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
- Parameters:
direction- given direction- Returns:
- a new Order with the given Direction
-
with
Returns aOrderwith the givenNullHandling.- Parameters:
nullHandling- can be null.- Returns:
- an Order with the given NullHandling
-
withProperties
Returns a newSortinginstance for the given properties.- Parameters:
properties- given properties- Returns:
- a new SortingImpl for the given properties
-
withProperty
Returns a newOrder- Parameters:
property- must not be null or empty.- Returns:
- a new Order
-
defaultBuilder
-