@Beta public final class ODataResourcePath extends Object
'val':
Entity(key='val')/NavigationProperty/Model.Function(1)/ResultProperty.
Of the result only the property ResultProperty is accessed.
| Constructor and Description |
|---|
ODataResourcePath() |
| Modifier and Type | Method and Description |
|---|---|
ODataResourcePath |
addParameterToLastSegment(AbstractODataParameters parameters)
Add a path parameter to the last segment.
|
ODataResourcePath |
addSegment(String segment)
Add a navigation to the path.
|
ODataResourcePath |
addSegment(String segment,
AbstractODataParameters parameters)
Add a navigation with a parameters or function or action call to the path.
|
boolean |
equals(Object o) |
List<io.vavr.Tuple2<String,AbstractODataParameters>> |
getSegments()
The current path as a list of its individual path segments.
|
int |
hashCode() |
static ODataResourcePath |
of(String segment)
Convenience method for
new ODataResourcePath().addSegment(segment). |
static ODataResourcePath |
of(String segment,
AbstractODataParameters segmentParameter)
Convenience method for
new ODataResourcePath().addSegment(segment, segmentParameter). |
String |
toEncodedPathString()
Encodes the path segments and assembles them together.
|
String |
toEncodedPathString(UriEncodingStrategy strategy)
Encodes the path segments and assembles them together.
|
String |
toString()
Builds the path segments to a full URL path.
|
@Nonnull public static ODataResourcePath of(@Nonnull String segment)
new ODataResourcePath().addSegment(segment). It creates a new resource path for
the given path string.segment - The string identifying the resource e.g. EntityNameODataResourcePath.@Nonnull public static ODataResourcePath of(@Nonnull String segment, @Nonnull AbstractODataParameters segmentParameter)
new ODataResourcePath().addSegment(segment, segmentParameter). It creates a new
resource path for the given path string and parameters.segment - The string identifying the resource e.g. EntityNamesegmentParameter - The parameters to be included in this segment e.g. (key1='val',key2=123)ODataResourcePath.@Nonnull public ODataResourcePath addSegment(@Nonnull String segment)
segment - The navigation to add. Any slashes will be encoded and not treated as segment separators.@Nonnull public ODataResourcePath addSegment(@Nonnull String segment, @Nullable AbstractODataParameters parameters)
segment - The unencoded navigation or function or action reference to add. Any slashes will be encoded and not
treated as segment separators.parameters - The unencoded parameters or parameters to add.@Nonnull public ODataResourcePath addParameterToLastSegment(@Nonnull AbstractODataParameters parameters)
parameters - The unencoded parameters to add.IllegalStateException - When the current path is empty or the last segment already contains a parameter.@Nonnull public String toEncodedPathString()
@Nonnull public String toEncodedPathString(@Nonnull UriEncodingStrategy strategy)
strategy - The URI encoding strategy.@Nonnull public List<io.vavr.Tuple2<String,AbstractODataParameters>> getSegments()
Copyright © 2022 SAP SE. All rights reserved.