Class PrimitivePropertyListGenerator
java.lang.Object
de.hybris.platform.odata2services.odata.schema.property.AbstractPropertyListGenerator
de.hybris.platform.odata2services.odata.schema.property.PrimitivePropertyListGenerator
- All Implemented Interfaces:
SchemaElementGenerator<List<org.apache.olingo.odata2.api.edm.provider.Property>,IntegrationObjectItemModel>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.olingo.odata2.api.edm.provider.Property>generate(IntegrationObjectItemModel itemModel) Generates the schema element whose type is defined by T.protected booleanisApplicable(TypeAttributeDescriptor descriptor) Allows subclasses to have a hook into the decision of whether an attribute should be presented as a simple property.voidsetIntegrationKeyPropertyGenerator(SchemaElementGenerator<Optional<org.apache.olingo.odata2.api.edm.provider.Property>, IntegrationObjectItemModel> integrationKeyPropertyGenerator) Methods inherited from class de.hybris.platform.odata2services.odata.schema.property.AbstractPropertyListGenerator
generate, getDescriptorFactory, getSimplePropertyGenerator, setDescriptorFactory, setSimplePropertyGenerator
-
Constructor Details
-
PrimitivePropertyListGenerator
public PrimitivePropertyListGenerator()
-
-
Method Details
-
generate
public List<org.apache.olingo.odata2.api.edm.provider.Property> generate(IntegrationObjectItemModel itemModel) Description copied from class:AbstractPropertyListGeneratorGenerates the schema element whose type is defined by T.Converts
itemModeto aTypeDescriptorand then delegates toAbstractPropertyListGenerator.generate(TypeDescriptor)- Specified by:
generatein interfaceSchemaElementGenerator<List<org.apache.olingo.odata2.api.edm.provider.Property>,IntegrationObjectItemModel> - Overrides:
generatein classAbstractPropertyListGenerator- Parameters:
itemModel- integration object item to generate simple EDM properties for.- 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.
- See Also:
-
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.
-
setIntegrationKeyPropertyGenerator
public void setIntegrationKeyPropertyGenerator(SchemaElementGenerator<Optional<org.apache.olingo.odata2.api.edm.provider.Property>, IntegrationObjectItemModel> integrationKeyPropertyGenerator)
-