Class ODataRequestFunction
java.lang.Object
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestFunction
- All Implemented Interfaces:
ODataRequestExecutable
The executable OData function request.
-
Field Summary
Fields inherited from class com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
csrfTokenRetriever, resourcePath, servicePath -
Constructor Summary
ConstructorsConstructorDescriptionODataRequestFunction(String servicePath, ODataResourcePath functionPath, StructuredQuery structQuery) Constructor with StructuredQuery for OData Function request.ODataRequestFunction(String servicePath, ODataResourcePath functionPath, ODataFunctionParameters parameters, String query, ODataProtocol protocol) Convenience constructor for invocations of unbound functions.ODataRequestFunction(String servicePath, ODataResourcePath functionPath, String encodedQuery, ODataProtocol protocol) Default constructor for OData Function request.ODataRequestFunction(String servicePath, String functionName, ODataFunctionParameters parameters, ODataProtocol protocol) Convenience constructor for invocations of unbound functions. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanexecute(org.apache.http.client.HttpClient httpClient) Execute the OData request with the provided HttpClient reference.getQuery()getRelativeUri(UriEncodingStrategy strategy) Get the static request URI of the OData resource.Use all OData query information to construct a HTTP request query String.inthashCode()Methods inherited from class com.sap.cloud.sdk.datamodel.odata.client.request.ODataRequestGeneric
addHeader, addHeaderIfAbsent, addListener, addQueryParameter, getHeaders, getListeners, getProtocol, getQueryParameters, getRelativeUri, getResourcePath, getServicePath, setCsrfTokenRetriever, setHeader, setHeader, tryExecute, tryExecuteWithCsrfToken
-
Constructor Details
-
ODataRequestFunction
public ODataRequestFunction(@Nonnull String servicePath, @Nonnull String functionName, @Nonnull ODataFunctionParameters parameters, @Nonnull ODataProtocol protocol) Convenience constructor for invocations of unbound functions. The function parameters will be added to the URL path or URL query depending on the OData protocol verison. For composable or bound functions please useODataRequestFunction(String, ODataResourcePath, String, ODataProtocol)instead.- Parameters:
servicePath- The OData service path.functionName- The name of the unbound OData function.parameters- The parameters of the function invocation.protocol- The OData protocol to use.
-
ODataRequestFunction
public ODataRequestFunction(@Nonnull String servicePath, @Nonnull ODataResourcePath functionPath, @Nonnull ODataFunctionParameters parameters, @Nullable String query, @Nonnull ODataProtocol protocol) Convenience constructor for invocations of unbound functions. The function parameters will be added to the URL path or URL query depending on the OData protocol verison. For composable or bound functions please useODataRequestFunction(String, ODataResourcePath, String, ODataProtocol)instead.- Parameters:
servicePath- The OData service path.functionPath- The fullODataResourcePathcontaining the function name, its parameters and possible further path segments. If this is a bound function the path must also contain the full path to the function.parameters- The parameters of the function invocation.query- Optional: The encoded HTTP query, if any.protocol- The OData protocol to use.
-
ODataRequestFunction
public ODataRequestFunction(@Nonnull String servicePath, @Nonnull ODataResourcePath functionPath, @Nullable String encodedQuery, @Nonnull ODataProtocol protocol) Default constructor for OData Function request.- Parameters:
servicePath- The OData service path.functionPath- The fullODataResourcePathcontaining the function name, its parameters and possible further path segments. If this is a bound function the path must also contain the full path to the function.encodedQuery- Optional: The encoded HTTP query, if any.protocol- The OData protocol to use.
-
ODataRequestFunction
public ODataRequestFunction(@Nonnull String servicePath, @Nonnull ODataResourcePath functionPath, @Nonnull StructuredQuery structQuery) Constructor with StructuredQuery for OData Function request.- Parameters:
servicePath- The OData service path.functionPath- The fullODataResourcePathcontaining the function name, its parameters and possible further path segments. If this is a bound function the path must also contain the full path to the function.structQuery- The structured query.
-
-
Method Details
-
getRelativeUri
Description copied from class:ODataRequestGenericGet the static request URI of the OData resource.- Specified by:
getRelativeUriin classODataRequestGeneric- Parameters:
strategy- URI encoding strategy.- Returns:
- The String representation of the request URI.
-
execute
@Nonnull public ODataRequestResultGeneric execute(@Nonnull org.apache.http.client.HttpClient httpClient) Description copied from interface:ODataRequestExecutableExecute the OData request with the provided HttpClient reference.- Parameters:
httpClient- The HttpClient.- Returns:
- An OData request result.
-
getRequestQuery
Description copied from class:ODataRequestGenericUse all OData query information to construct a HTTP request query String.- Overrides:
getRequestQueryin classODataRequestGeneric- Returns:
- The request query.
-
getQuery
-
equals
- Overrides:
equalsin classODataRequestGeneric
-
canEqual
- Overrides:
canEqualin classODataRequestGeneric
-
hashCode
public int hashCode()- Overrides:
hashCodein classODataRequestGeneric
-