A collection of methods which help to consume OData V4 services.
Node | Description |
---|
Method | Description |
---|---|
sap.ui.model.odata.v4.ODataUtils.compare |
Compares the given OData values. |
sap.ui.model.odata.v4.ODataUtils.deserializeBatchResponse |
Deserializes a batch response body using the batch boundary from the given value of the "Content-Type" header. |
sap.ui.model.odata.v4.ODataUtils.formatLiteral |
Formats the given OData value into a literal suitable for usage in data binding paths and URLs. |
sap.ui.model.odata.v4.ODataUtils.parseDate |
Parses an "Edm.Date" value and returns the corresponding JavaScript |
sap.ui.model.odata.v4.ODataUtils.parseDateTimeOffset |
Parses an "Edm.DateTimeOffset" value and returns the corresponding JavaScript |
sap.ui.model.odata.v4.ODataUtils.parseTimeOfDay |
Parses an "Edm.TimeOfDay" value and returns the corresponding JavaScript |
sap.ui.model.odata.v4.ODataUtils.serializeBatchRequest |
Serializes an array of requests to an object containing the batch request body and mandatory headers for the batch request. |
Compares the given OData values.
Param | Type | DefaultValue | Description |
---|---|---|---|
vValue1 | any |
The first value to compare |
|
vValue2 | any |
The second value to compare |
|
vEdmType | boolean string |
If |
Deserializes a batch response body using the batch boundary from the given value of the "Content-Type" header.
Param | Type | DefaultValue | Description |
---|---|---|---|
sContentType | string |
The value of the "Content-Type" header from the batch response, for example "multipart/mixed; boundary=batch_123456" |
|
sResponseBody | string |
A batch response body |
Formats the given OData value into a literal suitable for usage in data binding paths and URLs.
Param | Type | DefaultValue | Description |
---|---|---|---|
vValue | any |
The value according to "OData JSON Format Version 4.0" section "7.1 Primitive Value" |
|
sType | string |
The OData primitive type, for example "Edm.String" |
Parses an "Edm.Date" value and returns the corresponding JavaScript Date
value (UTC with a time value of "00:00:00").
Param | Type | DefaultValue | Description |
---|---|---|---|
sDate | string |
The "Edm.Date" value to parse |
Parses an "Edm.DateTimeOffset" value and returns the corresponding JavaScript Date
value.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDateTimeOffset | string |
The "Edm.DateTimeOffset" value to parse |
Parses an "Edm.TimeOfDay" value and returns the corresponding JavaScript Date
value (UTC with a date value of "1970-01-01").
Param | Type | DefaultValue | Description |
---|---|---|---|
sTimeOfDay | string |
The "Edm.TimeOfDay" value to parse |
Serializes an array of requests to an object containing the batch request body and mandatory headers for the batch request.
Param | Type | DefaultValue | Description |
---|---|---|---|
aRequests | object[] |
An array consisting of request objects or arrays of request objects, in case requests need to be sent in scope of a change set. See example below. Change set requests are annotated with a property |
|
sEpilogue | string |
A string that will be included in the epilogue (which acts like a comment) |