public class EdmURIBuilderImpl extends Object implements EdmURIBuilder
Modifier and Type | Field and Description |
---|---|
protected Map<String,String> |
customQueryOptions
Insertion-order map of custom query options.
|
protected Map<String,Object> |
functionImportParameters
Insertion-order map of function import parameters.
|
protected Map<String,String> |
queryOptions
Insertion-order map of query options.
|
protected List<Segment> |
segments |
Constructor and Description |
---|
EdmURIBuilderImpl(String serviceRoot)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
EdmURIBuilder |
addCustomQueryOption(String paramName,
Object paramValue)
Adds custom query option
|
EdmURIBuilder |
addQueryOption(QueryOption option,
String value)
Adds the specified query option to the URI.
|
EdmURIBuilder |
addQueryOption(String option,
String value,
boolean replace) |
EdmURIBuilder |
appendCountSegment()
Appends count segment to the URI.
|
EdmURIBuilder |
appendEntitySetSegment(EdmEntitySet entitySet)
Appends EntitySet segment to the URI.
|
EdmURIBuilder |
appendFunctionImportParameters(Map<EdmParameter,Object> functionImportParams)
Appends function import parameters
|
EdmURIBuilder |
appendFunctionImportSegment(EdmFunctionImport functionImport)
Appends Function import to the uri
|
EdmURIBuilder |
appendKeySegment(EdmProperty property,
Object value)
Appends key segment to the URI.
|
EdmURIBuilder |
appendKeySegment(Map<EdmProperty,Object> segmentValues)
Appends key segment to the URI, for multiple keys.
|
EdmURIBuilder |
appendMetadataSegment()
Appends metadata segment to the URI.
|
EdmURIBuilder |
appendNavigationSegment(EdmNavigationProperty property)
Appends navigation segment to the URI.
|
EdmURIBuilder |
appendPropertySegment(EdmProperty property,
String segmentValue)
Appends property segment to the URI.
|
EdmURIBuilder |
appendValueSegment()
Appends value segment to the URI.
|
URI |
build()
Build OData URI.
|
protected String |
buildMultiKeySegment(Map<EdmProperty,Object> segmentValues,
char separator) |
EdmURIBuilder |
expand(String... expandItems)
Adds expand query option.
|
EdmURIBuilder |
filter(String filter)
Adds filter query option.
|
EdmURIBuilder |
format(String format)
Adds format query option.
|
EdmURIBuilder |
orderBy(String property)
Adds orderby query option.
|
EdmURIBuilder |
replaceQueryOption(QueryOption option,
String value) |
EdmURIBuilder |
select(String... selectItems)
Adds select query option.
|
EdmURIBuilder |
skip(int skip)
Adds skip query option.
|
EdmURIBuilder |
top(int top)
Adds top query option.
|
protected final Map<String,String> customQueryOptions
public EdmURIBuilderImpl(String serviceRoot)
serviceRoot
- absolute URL (schema, host and port included) representing the location of the root of the data
service.public EdmURIBuilder appendCountSegment()
EdmURIBuilder
appendCountSegment
in interface EdmURIBuilder
public EdmURIBuilder appendValueSegment()
EdmURIBuilder
appendValueSegment
in interface EdmURIBuilder
public EdmURIBuilder appendMetadataSegment()
EdmURIBuilder
appendMetadataSegment
in interface EdmURIBuilder
public EdmURIBuilder format(String format)
EdmURIBuilder
format
in interface EdmURIBuilder
format
- media type acceptable in a response.QueryOption.FORMAT
public EdmURIBuilder appendEntitySetSegment(EdmEntitySet entitySet)
EdmURIBuilder
appendEntitySetSegment
in interface EdmURIBuilder
entitySet
- Edm entity set.public EdmURIBuilder appendNavigationSegment(EdmNavigationProperty property)
EdmURIBuilder
appendNavigationSegment
in interface EdmURIBuilder
property
- navigation property.public EdmURIBuilder appendKeySegment(EdmProperty property, Object value)
EdmURIBuilder
appendKeySegment
in interface EdmURIBuilder
property
- edm propertyvalue
- key valuepublic EdmURIBuilder appendKeySegment(Map<EdmProperty,Object> segmentValues)
EdmURIBuilder
appendKeySegment
in interface EdmURIBuilder
segmentValues
- segment values.protected String buildMultiKeySegment(Map<EdmProperty,Object> segmentValues, char separator) throws EdmException
EdmException
public EdmURIBuilder filter(String filter)
EdmURIBuilder
filter
in interface EdmURIBuilder
filter
- filter string.QueryOption.FILTER
public EdmURIBuilder select(String... selectItems)
EdmURIBuilder
select
in interface EdmURIBuilder
selectItems
- select itemsQueryOption.SELECT
public EdmURIBuilder orderBy(String property)
EdmURIBuilder
orderBy
in interface EdmURIBuilder
property
- property string.QueryOption.ORDERBY
public EdmURIBuilder top(int top)
EdmURIBuilder
top
in interface EdmURIBuilder
top
- maximum number of entities to be returned.QueryOption.TOP
public EdmURIBuilder skip(int skip)
EdmURIBuilder
skip
in interface EdmURIBuilder
skip
- number of entities to be skipped into the response.QueryOption.SKIP
public URI build()
EdmURIBuilder
build
in interface EdmURIBuilder
public EdmURIBuilder addQueryOption(QueryOption option, String value)
EdmURIBuilder
addQueryOption
in interface EdmURIBuilder
option
- query option.value
- query option value.public EdmURIBuilder replaceQueryOption(QueryOption option, String value)
public EdmURIBuilder addQueryOption(String option, String value, boolean replace)
public EdmURIBuilder appendPropertySegment(EdmProperty property, String segmentValue)
EdmURIBuilder
appendPropertySegment
in interface EdmURIBuilder
property
- edmPropertysegmentValue
- segment value.public EdmURIBuilder expand(String... expandItems)
EdmURIBuilder
expand
in interface EdmURIBuilder
expandItems
- items to be expanded in-lineQueryOption.EXPAND
public EdmURIBuilder addCustomQueryOption(String paramName, Object paramValue)
EdmURIBuilder
addCustomQueryOption
in interface EdmURIBuilder
paramName
- parameter nameparamValue
- parameter valuepublic EdmURIBuilder appendFunctionImportSegment(EdmFunctionImport functionImport)
EdmURIBuilder
appendFunctionImportSegment
in interface EdmURIBuilder
public EdmURIBuilder appendFunctionImportParameters(Map<EdmParameter,Object> functionImportParams)
EdmURIBuilder
appendFunctionImportParameters
in interface EdmURIBuilder
Copyright © 2013-2019 The Apache Software Foundation. All Rights Reserved.