Package io.micronaut.data.model
Class Sort.Order
java.lang.Object
io.micronaut.data.model.Sort.Order
- Enclosing interface:
 - Sort
 
The ordering of results.
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the direction of the ordering. - 
Constructor Summary
ConstructorsConstructorDescriptionConstructs an order for the given property in ascending order.Order(@NonNull String property, @NonNull Sort.Order.Direction direction, boolean ignoreCase) Constructs an order for the given property with the given direction. - 
Method Summary
Modifier and TypeMethodDescriptionstatic Sort.OrderCreates a new order for the given property in ascending order.static Sort.OrderCreates a new order for the given property in ascending order.static Sort.OrderCreates a new order for the given property in descending order.static Sort.OrderCreates a new order for the given property in descending order.booleaninthashCode()booleanboolean 
- 
Constructor Details
- 
Order
Constructs an order for the given property in ascending order.- Parameters:
 property- The property
 - 
Order
@Creator public Order(@NonNull @NonNull String property, @NonNull @NonNull Sort.Order.Direction direction, boolean ignoreCase) Constructs an order for the given property with the given direction.- Parameters:
 property- The propertydirection- The directionignoreCase- Whether to ignore case
 
 - 
 - 
Method Details
- 
isIgnoreCase
public boolean isIgnoreCase()- Returns:
 - Whether to ignore case when sorting
 
 - 
getDirection
- Returns:
 - The direction order by
 
 - 
getProperty
- Returns:
 - The property name to order by
 
 - 
desc
Creates a new order for the given property in descending order.- Parameters:
 property- The property- Returns:
 - The order instance
 
 - 
asc
Creates a new order for the given property in ascending order.- Parameters:
 property- The property- Returns:
 - The order instance
 
 - 
desc
Creates a new order for the given property in descending order.- Parameters:
 property- The propertyignoreCase- Whether to ignore case- Returns:
 - The order instance
 
 - 
asc
Creates a new order for the given property in ascending order.- Parameters:
 property- The propertyignoreCase- Whether to ignore case- Returns:
 - The order instance
 
 - 
isAscending
public boolean isAscending()- Returns:
 - Is the order ascending
 
 - 
equals
 - 
hashCode
public int hashCode() 
 -