Class LocalizedAttributeNavigationPropertyListGenerator
- java.lang.Object
-
- de.hybris.platform.odata2services.odata.schema.navigation.LocalizedAttributeNavigationPropertyListGenerator
-
- All Implemented Interfaces:
SchemaElementGenerator<java.util.List<org.apache.olingo.odata2.api.edm.provider.NavigationProperty>,java.util.Collection<IntegrationObjectItemAttributeModel>>
public class LocalizedAttributeNavigationPropertyListGenerator extends java.lang.Object implements SchemaElementGenerator<java.util.List<org.apache.olingo.odata2.api.edm.provider.NavigationProperty>,java.util.Collection<IntegrationObjectItemAttributeModel>>
The LocalizedAttributeNavigationPropertyListGenerator creates the navigation property that associates the localized entity with this entity. Since there is only one localized navigation property per entity, this generator returns a collection containing one navigation property.
-
-
Constructor Summary
Constructors Constructor Description LocalizedAttributeNavigationPropertyListGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Optional<TypeAttributeDescriptor>findFirstLocalizedAttribute(java.util.Collection<IntegrationObjectItemAttributeModel> attributeModels)Finds the first localized attribute from theCollectionof attributesjava.util.List<org.apache.olingo.odata2.api.edm.provider.NavigationProperty>generate(java.util.Collection<IntegrationObjectItemAttributeModel> attributeModels)Generates the schema element whose type is defined by T.
-
-
-
Method Detail
-
generate
public java.util.List<org.apache.olingo.odata2.api.edm.provider.NavigationProperty> generate(java.util.Collection<IntegrationObjectItemAttributeModel> attributeModels)
Description copied from interface:SchemaElementGeneratorGenerates the schema element whose type is defined by T.- Specified by:
generatein interfaceSchemaElementGenerator<java.util.List<org.apache.olingo.odata2.api.edm.provider.NavigationProperty>,java.util.Collection<IntegrationObjectItemAttributeModel>>- Parameters:
attributeModels- the object that is being converted- Returns:
- R the schema element
-
findFirstLocalizedAttribute
protected java.util.Optional<TypeAttributeDescriptor> findFirstLocalizedAttribute(java.util.Collection<IntegrationObjectItemAttributeModel> attributeModels)
Finds the first localized attribute from theCollectionof attributes- Parameters:
attributeModels- Collection of attributes- Returns:
- An
Optionalcontaining theTypeAttributeDescriptorif found, otherwise empty
-
-