Class Sort.Order
java.lang.Object
com.blazebit.persistence.deltaspike.data.Sort.Order
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Sort
PropertyPath implements the pairing of an
Sort.Direction and a property. It is used to provide input for
Sort- Since:
- 1.2.0
- Author:
- Christian Beikov
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOrder(Sort.Direction direction, String path) Creates a newSort.Orderwith the given direction and path.Order(Sort.Direction direction, String path, Sort.NullHandling nullHandling) Creates a newSort.Orderwith the given direction, path and null handling.Creates a newSort.Orderwith the given path andSort.Direction.ASC. -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends the string representation to the givenStringBuilder.booleanReturns the sort direction.Returns theSort.NullHandling.getPath()Returns the path of the Sort.Order.inthashCode()Returns a newSort.Orderwith case insensitive sorting enabled.booleanReturns whether sorting for this property should be ascending.booleanReturns whether sorting for this path should be descending.booleanReturns whether or not the sort will be case sensitive.Returns a newSort.OrderwithSort.NullHandling.NULLS_FIRSTas null handling.Returns a newSort.OrderwithSort.NullHandling.NULLS_LASTas null handling.Returns a newSort.OrderwithSort.NullHandling.NATIVEas null handling.toString()with(Sort.Direction direction) Returns a newSort.Orderwith the givenSort.Direction.with(Sort.NullHandling nullHandling) Returns a newSort.Orderwith the givenSort.NullHandling.Returns a newSort.Orderwith the same configuration as thisSort.Order, but the given path.
-
Constructor Details
-
Order
Creates a newSort.Orderwith the given direction and path.- Parameters:
direction- TheSort.Directionto use, defaults toSort.Direction.ASCifnullpath- The path to sort by
-
Order
Creates a newSort.Orderwith the given direction, path and null handling.- Parameters:
direction- TheSort.Directionto use, defaults toSort.Direction.ASCifnullpath- The path to sort bynullHandling- TheSort.NullHandlingto use, defaults toSort.NullHandling.NATIVEifnull
-
Order
Creates a newSort.Orderwith the given path andSort.Direction.ASC.- Parameters:
path- The path to sort by
-
-
Method Details
-
getDirection
Returns the sort direction.- Returns:
- The sort direction
-
getPath
Returns the path of the Sort.Order.- Returns:
- The path to sort by
-
isAscending
public boolean isAscending()Returns whether sorting for this property should be ascending.- Returns:
trueif sorting is ascending,falseotherwise
-
isDescending
public boolean isDescending()Returns whether sorting for this path should be descending.- Returns:
trueif sorting is descending,falseotherwise
-
isIgnoreCase
public boolean isIgnoreCase()Returns whether or not the sort will be case sensitive.- Returns:
trueif case insensitive,falseotherwise
-
with
Returns a newSort.Orderwith the givenSort.Direction.- Parameters:
direction- TheSort.Directionto use, defaults toSort.Direction.ASCifnull- Returns:
- A new
Sort.Orderwith the givenSort.Direction
-
withPath
Returns a newSort.Orderwith the same configuration as thisSort.Order, but the given path.- Parameters:
path- The path- Returns:
- A new
Sort.Orderwith the same configuration as thisSort.Order, but the given path
-
ignoreCase
Returns a newSort.Orderwith case insensitive sorting enabled.- Returns:
- A new
Sort.Orderwith case insensitive sorting enabled
-
with
Returns a newSort.Orderwith the givenSort.NullHandling.- Parameters:
nullHandling- TheSort.NullHandlingto use, defaults toSort.NullHandling.NATIVEifnull- Returns:
- A new
Sort.Orderwith the givenSort.NullHandling
-
nullsFirst
Returns a newSort.OrderwithSort.NullHandling.NULLS_FIRSTas null handling.- Returns:
- A new
Sort.OrderwithSort.NullHandling.NULLS_FIRSTas null handling
-
nullsLast
Returns a newSort.OrderwithSort.NullHandling.NULLS_LASTas null handling.- Returns:
- A new
Sort.OrderwithSort.NullHandling.NULLS_LASTas null handling
-
nullsNative
Returns a newSort.OrderwithSort.NullHandling.NATIVEas null handling.- Returns:
- A new
Sort.OrderwithSort.NullHandling.NATIVEas null handling
-
getNullHandling
Returns theSort.NullHandling.- Returns:
- The
Sort.NullHandling
-
appendTo
Appends the string representation to the givenStringBuilder.- Parameters:
sb- TheStringBuilderto append to
-
hashCode
public int hashCode() -
equals
-
toString
-