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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <EntityT> FieldOrdering<EntityT>asc(SimpleProperty<EntityT> property) Creates aFieldOrderingrepresenting an ascending order over the given propertystatic <EntityT> FieldOrdering<EntityT>desc(SimpleProperty<EntityT> property) Creates aFieldOrderingrepresenting an descending order over the given property.getOrder()static OrderExpressiontoOrderExpression(FieldOrdering<?>... orderings) Builds anOrderExpressionout of individual field orderings.
-
Constructor Details
-
FieldOrdering
-
-
Method Details
-
asc
@Nonnull public static <EntityT> FieldOrdering<EntityT> asc(@Nonnull SimpleProperty<EntityT> property) Creates aFieldOrderingrepresenting an ascending order over the given property- Type Parameters:
EntityT- The entity the ordering is applied to.- Parameters:
property- The property ofEntityTto be sorted in descending order.- Returns:
- The FieldOrdering.
-
desc
@Nonnull public static <EntityT> FieldOrdering<EntityT> desc(@Nonnull SimpleProperty<EntityT> property) Creates aFieldOrderingrepresenting an descending order over the given property.- Type Parameters:
EntityT- The entity the ordering is applied to.- Parameters:
property- The property ofEntityTto be sorted in descending order.- Returns:
- The FieldOrdering.
-
toOrderExpression
Builds anOrderExpressionout of individual field orderings. The expression represents a sorting where the orderings are applied in the order they are given.- Parameters:
orderings- TheFieldOrderings that should be applied to achieve a sorting.- Returns:
- The resulting
OrderExpressionornull, if no orderings where given.
-
getProperty
-
getOrder
-