Interface AnnotationStrategy
- All Known Implementing Classes:
DefaultAnnotationStrategy
public interface AnnotationStrategy
Implementations of this interface instruct the VDM generator on which annotations to apply to the generated Java
code.
At this time, annotations can be controlled in the following places:
- Classes representing OData entities, at the class level.
- Member variables representing OData properties of entities.
- Member variables representing OData navigation properties to other entity classes.
- Classes representing OData complex types, at the class level.
- Member variables representing OData properties of complex types.
-
Method Summary
Modifier and TypeMethodDescriptionGets a list of annotations to apply to generated member variables representing OData navigation properties.Gets a list of annotations to apply to generated classes representing OData complex types, at the class level.Gets a list of annotations to apply to generated member variables representing OData properties of complex types.Gets a list of annotations to apply to generated classes representing OData entities, at the class level.Gets a list of annotations to apply to generated member variables representing OData properties of entities.
-
Method Details
-
getAnnotationsForEntity
Gets a list of annotations to apply to generated classes representing OData entities, at the class level. The VDM generator calls this method and suppliesEntityAnnotationModel
objects with relevant information about the OData entity it is currently processing.- Parameters:
context
- Object representing an OData entity.- Returns:
- Set of
AnnotationDefinition
instances representing which annotations should be applied.
-
getAnnotationsForEntityProperty
@Nonnull Set<AnnotationDefinition> getAnnotationsForEntityProperty(@Nonnull EntityPropertyAnnotationModel context) Gets a list of annotations to apply to generated member variables representing OData properties of entities. The VDM generator calls this method and suppliesEntityPropertyAnnotationModel
objects with relevant information about the OData property it is currently processing.- Parameters:
context
- Object representing an OData entity property.- Returns:
- Set of
AnnotationDefinition
instances representing which annotations should be applied.
-
getAnnotationsForComplexType
@Nonnull Set<AnnotationDefinition> getAnnotationsForComplexType(@Nonnull EntityAnnotationModel context) Gets a list of annotations to apply to generated classes representing OData complex types, at the class level. The VDM generator calls this method and suppliesEntityAnnotationModel
objects with relevant information about the OData complex type it is currently processing.- Parameters:
context
- Object representing an OData complex type.- Returns:
- Set of
AnnotationDefinition
instances representing which annotations should be applied.
-
getAnnotationsForComplexTypeProperty
@Nonnull Set<AnnotationDefinition> getAnnotationsForComplexTypeProperty(@Nonnull EntityPropertyAnnotationModel context) Gets a list of annotations to apply to generated member variables representing OData properties of complex types. The VDM generator calls this method and suppliesEntityPropertyAnnotationModel
objects with relevant information about the OData property it is currently processing.- Parameters:
context
- Object representing an OData complex type property.- Returns:
- Set of
AnnotationDefinition
instances representing which annotations should be applied.
-