Class NullablePropertyAnnotationGenerator
java.lang.Object
de.hybris.platform.odata2services.odata.schema.attribute.NullablePropertyAnnotationGenerator
- All Implemented Interfaces:
PropertyAnnotationGenerator,SchemaElementGenerator<org.apache.olingo.odata2.api.edm.provider.AnnotationAttribute,TypeAttributeDescriptor>
public class NullablePropertyAnnotationGenerator
extends Object
implements PropertyAnnotationGenerator
Generate an annotation for EDMX property based on whether the property is nullable or not.
example:
<Property Nullable="true" .../>-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.olingo.odata2.api.edm.provider.AnnotationAttributegenerate(TypeAttributeDescriptor descriptor) Generates the schema element whose type is defined by T.booleanisApplicable(TypeAttributeDescriptor descriptor) Determines if this annotation generator is applicable for the given property
-
Constructor Details
-
NullablePropertyAnnotationGenerator
public NullablePropertyAnnotationGenerator()
-
-
Method Details
-
isApplicable
Description copied from interface:PropertyAnnotationGeneratorDetermines if this annotation generator is applicable for the given property- Specified by:
isApplicablein interfacePropertyAnnotationGenerator- Parameters:
descriptor- the TypeAttributeDescriptor to check- Returns:
- true if applicable, otherwise false
-
generate
public org.apache.olingo.odata2.api.edm.provider.AnnotationAttribute generate(TypeAttributeDescriptor descriptor) 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,TypeAttributeDescriptor> - Parameters:
descriptor- the object that is being converted- Returns:
- R the schema element
-