java.lang.Object
com.sap.cloud.sdk.datamodel.odata.client.expression.OrderExpression

public final class OrderExpression extends Object
A class representing order expressions over fields, maintaining an order over them.
  • Method Details

    • of

      @Nonnull public static OrderExpression of(@Nonnull String fieldName, @Nonnull Order order)
      To create OrderExpression with a field and ordering.
      Parameters:
      fieldName - The field name to create an order expression for.
      order - The order direction.
      Returns:
      The order expression.
    • toOrderByString

      @Nonnull public String toOrderByString()
      To translate OrderExpression to query string.
      Returns:
      The part of the query string dedicated to ordering.
    • and

      @Nonnull public OrderExpression and(@Nonnull String fieldName, @Nonnull Order order)
      To maintain a Map of OrderExpressions with field name and order.
      Parameters:
      fieldName - The field name to create an order expression for.
      order - The order direction.
      Returns:
      The concatenated order expression (conjunction).