public interface IQueryBuilder
| Modifier and Type | Method and Description |
|---|---|
IODataQuery |
build()
Builds an OData query from this builder.
|
IQueryBuilder |
enableMetadataCache()
Enables caching of the metadata of an OData V2 data source.
|
IQueryBuilder |
enableMetadataCache(com.sap.cloud.sdk.cloudplatform.cache.CacheKey cacheKey)
Enables caching of the metadata of an OData V2 data source.
|
IQueryBuilder |
expand(String... expands)
Selects navigation properties to expand.
|
IQueryBuilder |
filter(FilterExpression filter)
Adds a Filter expression to the OData query.
|
IQueryBuilder |
inlineCount()
Sets $inlinecount=allpages as a query parameter.
|
IQueryBuilder |
keys(Map<String,Object> keys) |
IQueryBuilder |
navigateTo(String navigation)
Adds navigation Property to the URL.
|
IQueryBuilder |
param(String key,
Object value)
Adds a query parameter to the OData request.
|
IQueryBuilder |
select(List<String> selects)
Selects properties to read.
|
IQueryBuilder |
select(String... selects)
Selects properties to read.
|
IQueryBuilder |
skip(Integer n)
Sets skip value.
|
IQueryBuilder |
top(Integer n)
Sets top value.
|
IQueryBuilder |
useMetadata(boolean useMetadata) |
IQueryBuilder |
withCacheRefresh()
Replaces the existing metadata in the cache with the latest version from the
OData V2 data source.
|
IQueryBuilder |
withHeader(String key,
String value)
Adds a header to the query request.
|
IQueryBuilder |
withHeader(String key,
String value,
boolean passInAllRequests)
Adds a header to the query request and optionally to the metadata request as
well depending on the value of the passInAllRequests parameter.
|
IQueryBuilder |
withMetadata(URL metadataFilePath)
Gets the metadata from the specified path.
|
IQueryBuilder |
withoutMetadata()
Used to tell the framework to not get the metadata before the actual query.
|
IQueryBuilder select(String... selects)
selects - The list of properties to be read.IQueryBuilder select(List<String> selects)
selects - of type List- The list of properties to be read.IQueryBuilder enableMetadataCache()
IQueryBuilder enableMetadataCache(com.sap.cloud.sdk.cloudplatform.cache.CacheKey cacheKey)
key - Cache key
containing the ID of the tenant where the application runs. You
can also include the user name in the cache key.IQueryBuilder withCacheRefresh()
IQueryBuilder withMetadata(URL metadataFilePath)
metadataFilePath - URL pointing to the metadata informationIQueryBuilder withHeader(String key, String value)
key - name of the headervalue - value of the headerIQueryBuilder withHeader(String key, String value, boolean passInAllRequests)
key - name of the headervalue - value of the headerpassInAllRequests - boolean indicating whether the header is to be
passed in all the requests to the backend like
$metadata call etc. made as part of the Query
Request call.IQueryBuilder inlineCount()
IQueryBuilder expand(String... expands)
expands - List of navigation properties to expandIQueryBuilder top(Integer n)
n - the top value requiredIQueryBuilder skip(Integer n)
n - the skip value requiredIQueryBuilder filter(FilterExpression filter)
filter - Object of FilterExpression that represents an OData filter
expression.IQueryBuilder param(String key, Object value)
key - value - IQueryBuilder withoutMetadata()
IODataQuery build()
IQueryBuilder navigateTo(String navigation)
Navigation - property name to be addedIQueryBuilder keys(Map<String,Object> keys)
IQueryBuilder useMetadata(boolean useMetadata)
Copyright © 2020 SAP. All Rights Reserved.