Interface ODataProtocol
- All Superinterfaces:
ODataLiteralSerializer
,ODataResponseDescriptor
- All Known Implementing Classes:
ODataProtocol.ODataProtocolV2
,ODataProtocol.ODataProtocolV4
The
ODataProtocol
defines all necessary information that is needed in order to differentiate between
different OData protocol versions.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
OData protocol v2.static final class
OData protocol v4. -
Field Summary
Modifier and TypeFieldDescriptionstatic final ODataProtocol
Version 2.0 of the OData protocol.static final ODataProtocol
Version 4.0 of the OData protocol. -
Method Summary
Modifier and TypeMethodDescriptionThe version number of this protocol.getQueryOptionInlineCount
(boolean optionEnabled) Build the (inline) count query option for this protocol version.default boolean
isEqualTo
(ODataProtocol otherProtocol) Compares this protocol with the given protocol based on their version identifiers.Methods inherited from interface com.sap.cloud.sdk.datamodel.odata.client.ODataLiteralSerializer
getDateTimeOffsetSerializer, getDateTimeSerializer, getNumberSerializer, getTimeOfDaySerializer, getUUIDSerializer
Methods inherited from interface com.sap.cloud.sdk.datamodel.odata.client.ODataResponseDescriptor
getPathToDeltaLink, getPathToInlineCount, getPathToNextLink, getPathToResultPrimitive, getPathToResultSet, getPathToResultSingle
-
Field Details
-
V2
Version 2.0 of the OData protocol. -
V4
Version 4.0 of the OData protocol.
-
-
Method Details
-
getProtocolVersion
The version number of this protocol.- Returns:
- A string representing the OData version, e.g. "4.0"
-
getQueryOptionInlineCount
Build the (inline) count query option for this protocol version.- Parameters:
optionEnabled
- Determines the value of the query option.- Returns:
- An entry to add to the URL query.
-
isEqualTo
Compares this protocol with the given protocol based on their version identifiers.- Parameters:
otherProtocol
- The protocol to compare to.- Returns:
- True, if the protocols resemble the same OData version.
-