@Beta public class ODataFunctionParameters extends AbstractODataParameters
Constructor and Description |
---|
ODataFunctionParameters(ODataProtocol protocol)
Create a new, empty set of parameters for an OData function.
|
Modifier and Type | Method and Description |
---|---|
<PrimitiveT> |
addParameter(String parameterName,
PrimitiveT value)
Add a parameter to function parameters
|
static ODataFunctionParameters |
empty(ODataProtocol protocol)
Convenience method to create an empty set of function parameters.
|
static ODataFunctionParameters |
of(Map<String,Object> parameters,
ODataProtocol protocol)
Create an instance of
ODataFunctionParameters from a set of parameters. |
String |
toEncodedString()
Serializes all parameters into an encoded URL path segment.
|
String |
toString()
Serializes all parameters into an unencoded URL path segment.
|
getProtocol
public ODataFunctionParameters(@Nonnull ODataProtocol protocol)
protocol
- The ODataProtocol
version the parameters should conform to.@Nonnull public static ODataFunctionParameters of(@Nonnull Map<String,Object> parameters, @Nonnull ODataProtocol protocol)
ODataFunctionParameters
from a set of parameters.parameters
- Key-value pairs for parameter values.protocol
- The ODataProtocol
version these parameters should conform to.ODataFunctionParameters
.IllegalArgumentException
- When the map contains a primitive type that is not supported.addParameter(String, Object)
@Nonnull public static ODataFunctionParameters empty(@Nonnull ODataProtocol protocol)
protocol
- The OData protocol version that the parameters should conform to.ODataFunctionParameters
@Nonnull public <PrimitiveT> ODataFunctionParameters addParameter(@Nonnull String parameterName, @Nullable PrimitiveT value)
PrimitiveT
- Type of the primitive value.parameterName
- Name of the property (derived from the EDMX)value
- Property value, assumed to be a primitive.IllegalArgumentException
- When a parameter by that idenfitier already exists or primitive type is not supported.@Nonnull public String toEncodedString()
()
(key1=val,key2=val)
toEncodedString
in class AbstractODataParameters
@Nonnull public String toString()
()
(key1=val,key2=val)
toString
in class AbstractODataParameters
Copyright © 2021 SAP SE. All rights reserved.