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
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classOData protocol v2.static final classOData protocol v4. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ODataProtocolVersion 2.0 of the OData protocol.static final ODataProtocolVersion 4.0 of the OData protocol. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanallowCustomQueryParameter(boolean isRoot, String key) Check whether custom query parameter can be attached to a structured-query.The version number of this protocol.getQueryOptionInlineCount(boolean optionEnabled) Build the (inline) count query option for this protocol version.default booleanisEqualTo(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, getUUIDSerializerMethods 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.
-
allowCustomQueryParameter
Check whether custom query parameter can be attached to a structured-query.- Parameters:
isRoot- indicates whether the structured-query is the root query or a nested query.key- the key of the custom query parameter.- Returns:
- true if the custom query parameter is allowed, false otherwise.
-
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.
-