@Beta public class ODataRequestRead extends ODataRequestGeneric
csrfTokenRetriever, resourcePath, servicePath
Constructor and Description |
---|
ODataRequestRead(String servicePath,
ODataResourcePath entityPath,
String encodedQuery,
ODataProtocol protocol)
Default constructor for OData Read request.
|
ODataRequestRead(String servicePath,
String entityName,
String encodedQuery,
ODataProtocol protocol)
Convenience constructor for OData read requests on entity collections directly.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
ODataRequestResultGeneric |
execute(org.apache.http.client.HttpClient httpClient)
Execute the OData request with the provided HttpClient reference.
|
String |
getQueryString() |
URI |
getRelativeUri()
Get the static request URI of the OData resource.
|
String |
getRequestQuery()
Use all OData query information to construct a HTTP request query String.
|
int |
hashCode() |
addHeader, addHeaderIfAbsent, addListener, addQueryParameter, getHeaders, getListeners, getProtocol, getQueryParameters, getResourcePath, getServicePath, setCsrfTokenRetriever, tryExecute, tryExecuteWithCsrfToken
public ODataRequestRead(@Nonnull String servicePath, @Nonnull String entityName, @Nullable String encodedQuery, @Nonnull ODataProtocol protocol)
ODataRequestRead(String, ODataResourcePath, String, ODataProtocol)
.servicePath
- The OData service path.entityName
- The OData entity name.encodedQuery
- Optional: The encoded HTTP query, if any.protocol
- The OData protocol to use.public ODataRequestRead(@Nonnull String servicePath, @Nonnull ODataResourcePath entityPath, @Nullable String encodedQuery, @Nonnull ODataProtocol protocol)
Note: The query string queryString
must not contain characters that are forbidden in URLs, like spaces.
If forbidden characters are present, an IllegalArgumentException
is thrown.
Build an instance of StructuredQuery
and pass the value of
StructuredQuery.getEncodedQueryString()
as queryString
to this method.
Alternatively, use UrlEscapers.urlFragmentEscaper()
from the Guava library to escape the query string
before passing it here.
servicePath
- The OData service path.entityPath
- The ODataResourcePath
that identifies the collection of entities or properties to read.encodedQuery
- Optional: The encoded HTTP query, if any.protocol
- The OData protocol to use.@Nonnull public URI getRelativeUri()
ODataRequestGeneric
getRelativeUri
in class ODataRequestGeneric
@Nonnull public String getRequestQuery()
ODataRequestGeneric
getRequestQuery
in class ODataRequestGeneric
@Nonnull public ODataRequestResultGeneric execute(@Nonnull org.apache.http.client.HttpClient httpClient)
ODataRequestExecutable
httpClient
- The HttpClient.public boolean equals(@Nullable Object o)
equals
in class ODataRequestGeneric
protected boolean canEqual(@Nullable Object other)
canEqual
in class ODataRequestGeneric
public int hashCode()
hashCode
in class ODataRequestGeneric
Copyright © 2021 SAP SE. All rights reserved.