Class PartOfGenerator
- java.lang.Object
-
- de.hybris.platform.odata2services.odata.schema.attribute.PartOfGenerator
-
- All Implemented Interfaces:
AnnotationGenerator<IntegrationObjectItemAttributeModel>,SchemaElementGenerator<org.apache.olingo.odata2.api.edm.provider.AnnotationAttribute,IntegrationObjectItemAttributeModel>
public class PartOfGenerator extends java.lang.Object implements AnnotationGenerator<IntegrationObjectItemAttributeModel>
A generator responsible for includings:IsPartOfannotation on thePropertyandNavigationPropertyEDMX elements.
-
-
Constructor Summary
Constructors Constructor Description PartOfGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.olingo.odata2.api.edm.provider.AnnotationAttributegenerate(IntegrationObjectItemAttributeModel itemAttributeModel)Generates the schema element whose type is defined by T.booleanisApplicable(IntegrationObjectItemAttributeModel model)Determines if this annotation generator is applicable for the given attribute or attributesprotected TypeAttributeDescriptortoDescriptor(IntegrationObjectItemAttributeModel model)Converts model to the attribute descriptor.
-
-
-
Method Detail
-
isApplicable
public boolean isApplicable(IntegrationObjectItemAttributeModel model)
Description copied from interface:AnnotationGeneratorDetermines if this annotation generator is applicable for the given attribute or attributes- Specified by:
isApplicablein interfaceAnnotationGenerator<IntegrationObjectItemAttributeModel>- Parameters:
model- the IntegrationObjectItemAttributeModel OR IntegrationObjectItemModel we are verifying on- Returns:
- true if applicable, otherwise false
-
toDescriptor
protected TypeAttributeDescriptor toDescriptor(IntegrationObjectItemAttributeModel model)
Converts model to the attribute descriptor.- Parameters:
model- a model to convert- Returns:
- an instance created by calling
DefaultTypeAttributeDescriptor.create(model)
-
generate
public org.apache.olingo.odata2.api.edm.provider.AnnotationAttribute generate(IntegrationObjectItemAttributeModel itemAttributeModel)
Description copied from interface:SchemaElementGeneratorGenerates the schema element whose type is defined by T.- Specified by:
generatein interfaceSchemaElementGenerator<org.apache.olingo.odata2.api.edm.provider.AnnotationAttribute,IntegrationObjectItemAttributeModel>- Parameters:
itemAttributeModel- the object that is being converted- Returns:
- R the schema element
-
-