Package io.jmix.core
Class Sort.ExpressionOrder
java.lang.Object
io.jmix.core.Sort.Order
io.jmix.core.Sort.ExpressionOrder
- All Implemented Interfaces:
Serializable
- Enclosing class:
Sort
Sort order that uses an expression instead of a property.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExpressionOrder(Sort.Direction direction, String expression) -
Method Summary
Modifier and TypeMethodDescriptionstatic Sort.OrderCreates a new order for the given expression with ASC direction.static Sort.OrderCreates a new order for the given expression with DESC direction.Returns the expression that should be added to the sorting.Methods inherited from class io.jmix.core.Sort.Order
getDirection, getProperty, toString
-
Field Details
-
expression
-
-
Constructor Details
-
ExpressionOrder
-
-
Method Details
-
asc
Creates a new order for the given expression with ASC direction. -
desc
Creates a new order for the given expression with DESC direction. -
getExpression
Returns the expression that should be added to the sorting.For instance, for the JPQL it can be
"function('calc_total_sum', {E}.id)".Note that for
KeyValueEntity, the{E}alias is not supported. Use the concrete alias from the query, e.g."e.id".- Returns:
- the expression
-