Class DefaultODataEntryToIntegrationKeyValueGenerator
- java.lang.Object
-
- de.hybris.platform.integrationservices.integrationkey.impl.AbstractIntegrationKeyValueGenerator<org.apache.olingo.odata2.api.edm.EdmEntitySet,org.apache.olingo.odata2.api.ep.entry.ODataEntry>
-
- de.hybris.platform.odata2services.odata.integrationkey.impl.DefaultODataEntryToIntegrationKeyValueGenerator
-
- All Implemented Interfaces:
IntegrationKeyValueGenerator<org.apache.olingo.odata2.api.edm.EdmEntitySet,org.apache.olingo.odata2.api.ep.entry.ODataEntry>
public class DefaultODataEntryToIntegrationKeyValueGenerator extends AbstractIntegrationKeyValueGenerator<org.apache.olingo.odata2.api.edm.EdmEntitySet,org.apache.olingo.odata2.api.ep.entry.ODataEntry>
-
-
Constructor Summary
Constructors Constructor Description DefaultODataEntryToIntegrationKeyValueGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcalcIntegrationKeyRecursively(org.apache.olingo.odata2.api.edm.EdmEntitySet type, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, IntegrationKeyAlias alias, IntegrationKeyValue keyValue)protected java.util.Optional<java.lang.String>findMatchingNavigationPropertyIn(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, java.lang.String entityName)java.lang.Stringgenerate(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry)Generates a compound key value for a data structure that has one or several key attributes/properties.protected org.apache.olingo.odata2.api.edm.EdmNavigationPropertygetNavigationProperty(org.apache.olingo.odata2.api.edm.EdmEntityType entityType, java.lang.String name)protected java.lang.StringgetNavigationPropertyName(org.apache.olingo.odata2.api.edm.EdmNavigationProperty property)protected java.lang.StringgetNavigationPropertyToRole(org.apache.olingo.odata2.api.edm.EdmNavigationProperty property)protected java.lang.ObjectgetProperty(org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, java.lang.String propertyName)Given an entry, it returns a property value.protected java.lang.StringgetTypeCode(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet)Given a type, it returns its code representation.protected java.lang.StringintegrationKeyValueFrom(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, java.lang.String integrationKeyAlias)protected voidpopulateKeyValueFromNavigationProperty(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, IntegrationKeyAlias aliasComponents, IntegrationKeyValue integrationKeyValue, java.lang.String propertyName)protected voidpopulateKeyValueFromSimpleProperty(org.apache.olingo.odata2.api.edm.EdmEntitySet type, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, IntegrationKeyValue keyValue, java.util.List<java.lang.String> propertyNames)protected voidsetPropertyValueInIntegrationKey(IntegrationKeyValue keyValue, org.apache.olingo.odata2.api.edm.EdmEntitySet type, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, java.lang.String propertyName)protected java.lang.StringtransformValueToString(java.lang.Object attributeValue)Implementations should transform a value into string representation.-
Methods inherited from class de.hybris.platform.integrationservices.integrationkey.impl.AbstractIntegrationKeyValueGenerator
buildIntegrationKeyValueMatchingAliasOrder, encodeValue, entitySimpleKeys, getEncoding, serializeKeyToString, setEncoding
-
-
-
-
Method Detail
-
generate
public java.lang.String generate(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry)Description copied from interface:IntegrationKeyValueGeneratorGenerates a compound key value for a data structure that has one or several key attributes/properties.- Parameters:
entitySet- definition of the payload structure that can be used to determine which elements of the payload structure contain the key value(s).oDataEntry- a data structure to generate the key value for.- Returns:
- integration key string representing the compound value of all key elements of the data structure
-
integrationKeyValueFrom
protected java.lang.String integrationKeyValueFrom(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, java.lang.String integrationKeyAlias)
-
calcIntegrationKeyRecursively
protected void calcIntegrationKeyRecursively(org.apache.olingo.odata2.api.edm.EdmEntitySet type, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, IntegrationKeyAlias alias, IntegrationKeyValue keyValue)
-
populateKeyValueFromSimpleProperty
protected void populateKeyValueFromSimpleProperty(org.apache.olingo.odata2.api.edm.EdmEntitySet type, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, IntegrationKeyValue keyValue, java.util.List<java.lang.String> propertyNames)
-
setPropertyValueInIntegrationKey
protected void setPropertyValueInIntegrationKey(IntegrationKeyValue keyValue, org.apache.olingo.odata2.api.edm.EdmEntitySet type, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, java.lang.String propertyName)
-
populateKeyValueFromNavigationProperty
protected void populateKeyValueFromNavigationProperty(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, IntegrationKeyAlias aliasComponents, IntegrationKeyValue integrationKeyValue, java.lang.String propertyName)
-
findMatchingNavigationPropertyIn
protected java.util.Optional<java.lang.String> findMatchingNavigationPropertyIn(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, java.lang.String entityName)
-
getNavigationProperty
protected org.apache.olingo.odata2.api.edm.EdmNavigationProperty getNavigationProperty(org.apache.olingo.odata2.api.edm.EdmEntityType entityType, java.lang.String name)
-
getNavigationPropertyToRole
protected java.lang.String getNavigationPropertyToRole(org.apache.olingo.odata2.api.edm.EdmNavigationProperty property)
-
getNavigationPropertyName
protected java.lang.String getNavigationPropertyName(org.apache.olingo.odata2.api.edm.EdmNavigationProperty property)
-
getTypeCode
protected java.lang.String getTypeCode(org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet)
Description copied from class:AbstractIntegrationKeyValueGeneratorGiven a type, it returns its code representation.- Specified by:
getTypeCodein classAbstractIntegrationKeyValueGenerator<org.apache.olingo.odata2.api.edm.EdmEntitySet,org.apache.olingo.odata2.api.ep.entry.ODataEntry>- Parameters:
entitySet- The type to be used.- Returns:
- The type code.
-
getProperty
protected java.lang.Object getProperty(org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, java.lang.String propertyName)Description copied from class:AbstractIntegrationKeyValueGeneratorGiven an entry, it returns a property value.- Specified by:
getPropertyin classAbstractIntegrationKeyValueGenerator<org.apache.olingo.odata2.api.edm.EdmEntitySet,org.apache.olingo.odata2.api.ep.entry.ODataEntry>- Parameters:
entry- The entry to be used.propertyName- The propertyName to look for.- Returns:
- The value related to propertyName.
-
transformValueToString
protected java.lang.String transformValueToString(java.lang.Object attributeValue)
Description copied from class:AbstractIntegrationKeyValueGeneratorImplementations should transform a value into string representation. For instance Date.- Specified by:
transformValueToStringin classAbstractIntegrationKeyValueGenerator<org.apache.olingo.odata2.api.edm.EdmEntitySet,org.apache.olingo.odata2.api.ep.entry.ODataEntry>- Parameters:
attributeValue- the value to be converted.- Returns:
- The string representation
-
-