enum sap.ui.model.odata.OperationMode

Visiblity: public
Available since: N/A
Module: sap/ui/model/odata/OperationMode
Application Component: CA-UI5-COR

Different modes for executing service operations (filtering, sorting)


Properties Overview

Node Description
sap.ui.model.odata.OperationMode.Auto

With operation mode Auto, operations are either processed on the client or on the server. The exact behavior depends on the configured CountMode, on the threshold and on the size of the data:

  1. Count Modes Request and Both
    Initially the binding will issue a $count request without any filters/sorters.
    1. If the count is lower or equal to the threshold, the binding will behave like in operation mode Client, and a data request for all entries is issued.
    2. If the count exceeds the threshold, the binding will behave like in operation mode Server.
  2. Count Modes Inline or InlineRepeat
    The initial request tries to fetch as many entries as configured with the threshold parameter, without specifying any filters/sorters. In addition, the query parameter $inlinecount is added. The binding assumes, that the threshold given by the application can be met, but it adapts its behavior depending on the response:
    1. If the response returns fewer (or just as many) entries as the threshold, the binding will behave exactly like when using the operation mode Client. Initially configured filters/sorters will be applied afterwards on the client.
    2. If the $inlinecount is higher than the threshold, the binding will behave like in operation mode Server. In this case a new data request containing the initially set filters/sorters will be issued.
    It is up to the application to chose an appropriate threshold value. Ideally, it should be high enough to fetch all data in the most common scenarios (to avoid a fallback to operation mode Server, requiring an additional request), but it also should be low enough to ensure a fast response in case there is much more data than expected.
  3. Count mode None is not supported together with operation mode Auto

sap.ui.model.odata.OperationMode.Client

Operations are executed on the client. This only works if all entries are loaded on the client. The initial request fetches the complete collection, filtering and sorting does not trigger further requests.

sap.ui.model.odata.OperationMode.Default

By default, all operations are executed on the server in the OData service request (Server mode). Only if the collection is already expanded and all entries are available on the client, all operations are executed on the client (Client mode).

sap.ui.model.odata.OperationMode.Server

Operations are executed on the server in the OData service request, by appending corresponding URL parameters ($filter, $orderby). Each change in filtering or sorting triggers a new request to the server.