@Beta public class ODataEntityKey extends Object
Constructor and Description |
---|
ODataEntityKey() |
Modifier and Type | Method and Description |
---|---|
ODataEntityKey |
addKeyProperties(Map<String,Object> properties)
Add properties to the OData entity key.
|
<PrimitiveT> |
addKeyProperty(String propertyName,
PrimitiveT value)
Add an entity property to this composite key.
|
Set<String> |
getFieldNames()
Get the field names that are part of the composite key.
|
static ODataEntityKey |
of(Map<String,Object> key)
Create an instance of
ODataEntityKey from a generic key-value composition. |
String |
toString(ODataProtocol protocol)
Serializes key properties into an OData URL format for entity keys.
|
@Nonnull public Set<String> getFieldNames()
public <PrimitiveT> void addKeyProperty(@Nonnull String propertyName, @Nonnull PrimitiveT value)
PrimitiveT
- Type of the primitive value.propertyName
- Name of the property (derived from the EDMX)value
- Property value, assumed to be a primitive.IllegalArgumentException
- When there is no mapping found for the provided Java literal.@Nonnull public ODataEntityKey addKeyProperties(@Nonnull Map<String,Object> properties)
properties
- The key-value mapping.@Nonnull public static ODataEntityKey of(@Nonnull Map<String,Object> key)
ODataEntityKey
from a generic key-value composition.key
- Key-value pairs for primitive entity properties (derived from the EDMX)ODataEntityKey
.IllegalArgumentException
- When there is no mapping found for the provided Java literal.@Nonnull public String toString(@Nonnull ODataProtocol protocol)
Copyright © 2020 SAP SE. All rights reserved.