Class AbstractPropertyListElementGenerator
java.lang.Object
de.hybris.platform.odata2services.odata.schema.property.AbstractPropertyListElementGenerator
- All Implemented Interfaces:
SchemaElementGenerator<List<org.apache.olingo.odata2.api.edm.provider.Property>,TypeDescriptor>
- Direct Known Subclasses:
LocalizedPropertyListElementGenerator,PrimitivePropertyListElementGenerator
public abstract class AbstractPropertyListElementGenerator
extends Object
implements SchemaElementGenerator<List<org.apache.olingo.odata2.api.edm.provider.Property>,TypeDescriptor>
An abstract generator of properties for simple attributes in the EDMX schema from the
TypeDescriptor.-
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.olingo.odata2.api.edm.provider.Property>generate(@NotNull TypeDescriptor typeDescriptor) Generates simple properties for simple (not navigation) attributes declared in the type descriptorprotected abstract List<org.apache.olingo.odata2.api.edm.provider.Property>generateAdditionalProperties(TypeDescriptor typeDescriptor) Allows subclass to have a hook to add additional properties(i.e.protected List<org.apache.olingo.odata2.api.edm.provider.Property>generateSimpleProperties(TypeDescriptor typeDescriptor) protected abstract booleanisApplicable(TypeAttributeDescriptor descriptor) Allows subclasses to have a hook into the decision of whether an attribute should be presented as a simple property.
-
Method Details
-
generate
public List<org.apache.olingo.odata2.api.edm.provider.Property> generate(@NotNull @NotNull TypeDescriptor typeDescriptor) Generates simple properties for simple (not navigation) attributes declared in the type descriptor- Specified by:
generatein interfaceSchemaElementGenerator<List<org.apache.olingo.odata2.api.edm.provider.Property>,TypeDescriptor> - Parameters:
typeDescriptor- 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.
-
generateSimpleProperties
protected List<org.apache.olingo.odata2.api.edm.provider.Property> generateSimpleProperties(TypeDescriptor typeDescriptor) -
generateAdditionalProperties
protected abstract List<org.apache.olingo.odata2.api.edm.provider.Property> generateAdditionalProperties(TypeDescriptor typeDescriptor) Allows subclass to have a hook to add additional properties(i.e. key or language properties)- Parameters:
typeDescriptor- describes integration object item, for which simple EDM properties need to be generated.- Returns:
- a list of additional properties if available
-
isApplicable
Allows 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.- 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.
-