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 Details

    • getAnnotationsForEntity

      @Nonnull Set<AnnotationDefinition> getAnnotationsForEntity(@Nonnull EntityAnnotationModel context)
      Gets a list of annotations to apply to generated classes representing OData entities, at the class level. The VDM generator calls this method and supplies EntityAnnotationModel 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 supplies EntityPropertyAnnotationModel 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.
    • getAnnotationsForAssociatedEntity

      @Nonnull Set<AnnotationDefinition> getAnnotationsForAssociatedEntity(@Nonnull NavigationPropertyAnnotationModel context)
      Gets a list of annotations to apply to generated member variables representing OData navigation properties. The VDM generator calls this method and supplies NavigationPropertyAnnotationModel objects with relevant information about the OData property it is currently processing.
      Parameters:
      context - Object representing an OData navigation 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 supplies EntityAnnotationModel 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 supplies EntityPropertyAnnotationModel 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.