Class FieldOrdering<EntityT>
java.lang.Object
com.sap.cloud.sdk.datamodel.odatav4.expression.FieldOrdering<EntityT>
- Type Parameters:
EntityT
- The entity type that is ordered.
Represents an asc/desc ordering of an entity via a property.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <EntityT> FieldOrdering<EntityT>
asc
(SimpleProperty<EntityT> property) Creates aFieldOrdering
representing an ascending order over the given propertystatic <EntityT> FieldOrdering<EntityT>
desc
(SimpleProperty<EntityT> property) Creates aFieldOrdering
representing an descending order over the given property.getOrder()
static OrderExpression
toOrderExpression
(FieldOrdering<?>... orderings) Builds anOrderExpression
out of individual field orderings.
-
Constructor Details
-
FieldOrdering
-
-
Method Details
-
asc
@Nonnull public static <EntityT> FieldOrdering<EntityT> asc(@Nonnull SimpleProperty<EntityT> property) Creates aFieldOrdering
representing an ascending order over the given property- Type Parameters:
EntityT
- The entity the ordering is applied to.- Parameters:
property
- The property ofEntityT
to be sorted in descending order.- Returns:
- The FieldOrdering.
-
desc
@Nonnull public static <EntityT> FieldOrdering<EntityT> desc(@Nonnull SimpleProperty<EntityT> property) Creates aFieldOrdering
representing an descending order over the given property.- Type Parameters:
EntityT
- The entity the ordering is applied to.- Parameters:
property
- The property ofEntityT
to be sorted in descending order.- Returns:
- The FieldOrdering.
-
toOrderExpression
Builds anOrderExpression
out of individual field orderings. The expression represents a sorting where the orderings are applied in the order they are given.- Parameters:
orderings
- TheFieldOrdering
s that should be applied to achieve a sorting.- Returns:
- The resulting
OrderExpression
ornull
, if no orderings where given.
-
getProperty
-
getOrder
-