Package org.apache.olingo.client.api.uri
Interface URIBuilder
public interface URIBuilder
-
Method Summary
Modifier and TypeMethodDescriptionaddCustomQueryOption
(String customName, String customValue) Adds/Replaces the specified custom query option to the URI.addParameterAlias
(String alias, String exp) Adds the specified (custom) parameter alias to the URI.addQueryOption
(String option, String value, boolean replace) Adds/Replaces the specified (custom) query option to the URI.addQueryOption
(QueryOption option, String value) Adds the specified query option to the URI.appendActionCallSegment
(String action) Appends action segment to the URI.Appends all segment to the URI.Appends batch segment to the URI.Appends count segment to the URI.appendCrossjoinSegment
(String... segmentValues) Appends cross join segment to the URI.appendDerivedEntityTypeSegment
(String segmentValue) Appends derived entity type segment to the URI.appendEntityIdSegment
(String segmentValue) Appends entity-id segment to the URI.appendEntitySetSegment
(String segmentValue) Appends EntitySet segment to the URI.appendKeySegment
(Object val) Appends key segment to the URI.appendKeySegment
(Map<String, Object> segmentValues) Appends key segment to the URI, for multiple keys.appendKeySegment
(Map<String, org.apache.commons.lang3.tuple.Pair<EdmEnumType, String>> enumValues, Map<String, Object> segmentValues) Appends key segment to the URI, for multiple keys.appendKeySegment
(EdmEnumType enumType, String memberName) Appends enum key segment to the URI.Appends metadata segment to the URI.appendNavigationSegment
(String segmentValue) Appends navigation segment to the URI.appendOperationCallSegment
(String operation) Appends operation (action or function) segment to the URI.appendPropertySegment
(String segmentValue) Appends property segment to the URI.Appends ref segment to the URI.appendSingletonSegment
(String segmentValue) Appends Singleton segment to the URI.Appends value segment to the URI.build()
Build OData URI.count()
Adds count query option.count
(boolean value) Appends count query option.Adds expand query option.expandWithOptions
(String expandItem, boolean pathRef, boolean pathCount, Map<QueryOption, Object> options) The set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].expandWithOptions
(String expandItem, Map<QueryOption, Object> options) The set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].expandWithSelect
(String expandItem, String... selectItems) Properties of related entities can be specified by including the $select query option within the $expand.Adds filter query option.Adds filter for filter query option.Adds format query option.Adds id query option.Adds orderby query option.replaceQueryOption
(QueryOption option, String value) Adds/replaces the specified query option to the URI.Appends search query option.Appends search query option.Adds select query option.skip
(int skip) Adds skip query option.Adds skiptoken query option.top
(int top) Adds top query option.
-
Method Details
-
addQueryOption
Adds the specified query option to the URI.
Concatenates value if the specified query option already exists.- Parameters:
option
- query option.value
- query option value.- Returns:
- current URIBuilder instance
-
replaceQueryOption
Adds/replaces the specified query option to the URI.- Parameters:
option
- query option.value
- query option value.- Returns:
- current URIBuilder instance
-
addQueryOption
Adds/Replaces the specified (custom) query option to the URI.- Parameters:
option
- query option.value
- query option value.replace
- if true then replace existing one.- Returns:
- current URIBuilder instance.
-
addParameterAlias
Adds the specified (custom) parameter alias to the URI.- Parameters:
alias
- parameter alias.exp
- expression value.- Returns:
- current URIBuilder instance.
-
appendEntitySetSegment
Appends EntitySet segment to the URI.- Parameters:
segmentValue
- segment value.- Returns:
- current URIBuilder instance
-
appendKeySegment
Appends key segment to the URI.- Parameters:
val
- segment value.- Returns:
- current URIBuilder instance
-
appendKeySegment
Appends key segment to the URI, for multiple keys.- Parameters:
segmentValues
- segment values.- Returns:
- current URIBuilder instance
-
appendPropertySegment
Appends property segment to the URI.- Parameters:
segmentValue
- segment value.- Returns:
- current URIBuilder instance
-
appendDerivedEntityTypeSegment
Appends derived entity type segment to the URI.- Parameters:
segmentValue
- segment value.- Returns:
- current URIBuilder instance
-
appendValueSegment
URIBuilder appendValueSegment()Appends value segment to the URI.- Returns:
- current URIBuilder instance
-
appendCountSegment
URIBuilder appendCountSegment()Appends count segment to the URI.- Returns:
- current URIBuilder instance
-
appendOperationCallSegment
Appends operation (action or function) segment to the URI.- Parameters:
operation
- Operation (action or function) name- Returns:
- current URIBuilder instance
-
appendMetadataSegment
URIBuilder appendMetadataSegment()Appends metadata segment to the URI.- Returns:
- current URIBuilder instance
-
appendBatchSegment
URIBuilder appendBatchSegment()Appends batch segment to the URI.- Returns:
- current URIBuilder instance
-
count
URIBuilder count()Adds count query option.- Returns:
- current URIBuilder instance
-
expand
Adds expand query option.- Parameters:
expandItems
- items to be expanded in-line- Returns:
- current URIBuilder instance
- See Also:
-
format
Adds format query option.- Parameters:
format
- media type acceptable in a response.- Returns:
- current URIBuilder instance
- See Also:
-
filter
Adds filter for filter query option.- Parameters:
filter
- filter instance (to be obtained via FilterFactory); note that build() method will be immediately invoked.- Returns:
- current URIBuilder instance
- See Also:
-
filter
Adds filter query option.- Parameters:
filter
- filter string.- Returns:
- current URIBuilder instance
- See Also:
-
select
Adds select query option.- Parameters:
selectItems
- select items- Returns:
- current URIBuilder instance
- See Also:
-
orderBy
Adds orderby query option.- Parameters:
order
- order string.- Returns:
- current URIBuilder instance
- See Also:
-
top
Adds top query option.- Parameters:
top
- maximum number of entities to be returned.- Returns:
- current URIBuilder instance
- See Also:
-
skip
Adds skip query option.- Parameters:
skip
- number of entities to be skipped into the response.- Returns:
- current URIBuilder instance
- See Also:
-
skipToken
Adds skiptoken query option.- Parameters:
skipToken
- opaque token.- Returns:
- current URIBuilder instance
- See Also:
-
build
URI build()Build OData URI.- Returns:
- OData URI.
-
appendKeySegment
Appends enum key segment to the URI.- Parameters:
enumType
- enum typememberName
- enum member name- Returns:
- current URIBuilder instance
-
appendKeySegment
URIBuilder appendKeySegment(Map<String, org.apache.commons.lang3.tuple.Pair<EdmEnumType, String>> enumValues, Map<String, Object> segmentValues) Appends key segment to the URI, for multiple keys.- Parameters:
enumValues
- enum segment values.segmentValues
- segment values.- Returns:
- current URIBuilder instance
-
appendSingletonSegment
Appends Singleton segment to the URI.- Parameters:
segmentValue
- segment value.- Returns:
- current URIBuilder instance
-
appendEntityIdSegment
Appends entity-id segment to the URI.- Parameters:
segmentValue
- segment value- Returns:
- current URIBuilder instance
-
appendRefSegment
URIBuilder appendRefSegment()Appends ref segment to the URI.- Returns:
- current URIBuilder instance
-
appendCrossjoinSegment
Appends cross join segment to the URI.- Parameters:
segmentValues
- segment values.- Returns:
- current URIBuilder instance
-
appendAllSegment
URIBuilder appendAllSegment()Appends all segment to the URI.- Returns:
- current URIBuilder instance
-
id
Adds id query option.- Parameters:
idValue
- opaque token.- Returns:
- current URIBuilder instance
- See Also:
-
count
Appends count query option.- Parameters:
value
- true or false- Returns:
- current URIBuilder instance
- See Also:
-
search
Appends search query option.- Parameters:
search
- search expression- Returns:
- current URIBuilder instance
- See Also:
-
search
Appends search query option.- Parameters:
expression
- search expression- Returns:
- current URIBuilder instance
- See Also:
-
expandWithOptions
The set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].- Parameters:
expandItem
- item to be expanded.options
- System query options. Allowed query options are: $filter, $select, $orderby, $skip, $top, $count, $search, $expand, and $levels.- Returns:
- current URIBuilder instance.
- See Also:
-
expandWithOptions
URIBuilder expandWithOptions(String expandItem, boolean pathRef, boolean pathCount, Map<QueryOption, Object> options) The set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].- Parameters:
expandItem
- item to be expanded.pathRef
- include the /$ref at the end of the $expand item's path;if true pathCount MUST be falsepathCount
- include /$count at the end of the $expand item's path;if true pathRef MUST be falseoptions
- System query options. Allowed query options are: $filter, $select, $orderby, $skip, $top, $count, $search, $expand, and $levels.- Returns:
- current URIBuilder instance.
- See Also:
-
expandWithSelect
Properties of related entities can be specified by including the $select query option within the $expand.
http://host/service/Products?$expand=Category($select=Name)- Parameters:
expandItem
- related entity name.selectItems
- properties to be selected.- Returns:
- current URIBuilder instance.
- See Also:
-
appendActionCallSegment
Appends action segment to the URI.- Parameters:
action
- Action name- Returns:
- current URIBuilder instance
-
addCustomQueryOption
Adds/Replaces the specified custom query option to the URI.- Parameters:
option
- .value
- .- Returns:
- current URIBuilder instance.
-