Class LocalizedPropertyListGenerator
java.lang.Object
de.hybris.platform.odata2services.odata.schema.property.AbstractPropertyListGenerator
de.hybris.platform.odata2services.odata.schema.property.LocalizedPropertyListGenerator
- All Implemented Interfaces:
SchemaElementGenerator<List<org.apache.olingo.odata2.api.edm.provider.Property>,IntegrationObjectItemModel>
Generates properties for Localized___Attributes type in the EDMX schema. That is a special type to capture values of all localized
attributes in an integration object item for a given locale. For example, if an integration object item has
name and
description localized attributes, then the Localized___Attributes type will have these properties: language,
name and description-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.olingo.odata2.api.edm.provider.Property>generate(TypeDescriptor descriptor) Generates simple properties for simple (not navigation) attributes declared in the type descriptorprotected booleanisApplicable(TypeAttributeDescriptor descriptor) Allows subclasses to have a hook into the decision of whether an attribute should be presented as a simple property.org.apache.olingo.odata2.api.edm.provider.PropertyMethods inherited from class de.hybris.platform.odata2services.odata.schema.property.AbstractPropertyListGenerator
generate, getDescriptorFactory, getSimplePropertyGenerator, setDescriptorFactory, setSimplePropertyGenerator
-
Constructor Details
-
LocalizedPropertyListGenerator
public LocalizedPropertyListGenerator()
-
-
Method Details
-
generate
Description copied from class:AbstractPropertyListGeneratorGenerates simple properties for simple (not navigation) attributes declared in the type descriptor- Overrides:
generatein classAbstractPropertyListGenerator- Parameters:
descriptor- describes integration object item, for which simple EDM properties need to be generated.- Returns:
- a list of simple EDM properties or an empty list, if the integration object item does not have properties or has only navigation properties referring other integration object items.
-
isApplicable
Description copied from class:AbstractPropertyListGeneratorAllows subclasses to have a hook into the decision of whether an attribute should be presented as a simple property. This class already checks whether the attribute is simple, i.e. it's a primitive and not a collection, before checking this method.- Specified by:
isApplicablein classAbstractPropertyListGenerator- Parameters:
descriptor- an attribute descriptor to decided about whether it should be presented as EDM property or not.- Returns:
true, if the attribute should be converted to a property;false, otherwise. This default implementation always returnstrue.
-
languageProperty
public org.apache.olingo.odata2.api.edm.provider.Property languageProperty()
-