Class 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 Detail

      • DefaultODataEntryToIntegrationKeyValueGenerator

        public DefaultODataEntryToIntegrationKeyValueGenerator()
    • 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: IntegrationKeyValueGenerator
        Generates 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: AbstractIntegrationKeyValueGenerator
        Given a type, it returns its code representation.
        Specified by:
        getTypeCode in class AbstractIntegrationKeyValueGenerator<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: AbstractIntegrationKeyValueGenerator
        Given an entry, it returns a property value.
        Specified by:
        getProperty in class AbstractIntegrationKeyValueGenerator<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: AbstractIntegrationKeyValueGenerator
        Implementations should transform a value into string representation. For instance Date.
        Specified by:
        transformValueToString in class AbstractIntegrationKeyValueGenerator<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