EntityT
- The entity type that is ordered.public class FieldOrdering<EntityT> extends Object
Constructor and Description |
---|
FieldOrdering(SimpleProperty<EntityT> property,
Order order) |
Modifier and Type | Method and Description |
---|---|
static <EntityT> FieldOrdering<EntityT> |
asc(SimpleProperty<EntityT> property)
Creates a
FieldOrdering representing an ascending order over the given property |
static <EntityT> FieldOrdering<EntityT> |
desc(SimpleProperty<EntityT> property)
Creates a
FieldOrdering representing an descending order over the given property. |
Order |
getOrder() |
SimpleProperty<EntityT> |
getProperty() |
static OrderExpression |
toOrderExpression(FieldOrdering<?>... orderings)
Builds an
OrderExpression out of individual field orderings. |
public FieldOrdering(SimpleProperty<EntityT> property, Order order)
@Nonnull public static <EntityT> FieldOrdering<EntityT> asc(@Nonnull SimpleProperty<EntityT> property)
FieldOrdering
representing an ascending order over the given propertyEntityT
- The entity the ordering is applied to.property
- The property of EntityT
to be sorted in descending order.@Nonnull public static <EntityT> FieldOrdering<EntityT> desc(@Nonnull SimpleProperty<EntityT> property)
FieldOrdering
representing an descending order over the given property.EntityT
- The entity the ordering is applied to.property
- The property of EntityT
to be sorted in descending order.@Nullable public static OrderExpression toOrderExpression(FieldOrdering<?>... orderings)
OrderExpression
out of individual field orderings. The expression represents a sorting where
the orderings are applied in the order they are given.orderings
- The FieldOrdering
s that should be applied to achieve a sorting.OrderExpression
or null
, if no orderings where given.public SimpleProperty<EntityT> getProperty()
public Order getOrder()
Copyright © 2020 SAP SE. All rights reserved.