Annotation Type EdmEnumeration


@Retention(RUNTIME) @Target(TYPE) public @interface EdmEnumeration
Annotation to tag Java enumerations that shall be provided via an OData service. For details about OData Enumerations see: 10 Enumeration Type. The following conversion rule have been established:
  • Name is taken from the enumeration name
  • UnderlyingType is derived from the converter, if no converter is provided Edm.Int32 is taken and a field in an entity pojo needed to be annotated with @Enumerated.
  • Member
  • Name is the name of a constant
  • Value is determined via the converter, if no converter is provided the value is determined via the method ordinal
Author:
Oliver Grande
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Converter shall be optional, as java does not support default null a dummy converter implementation is needed.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends javax.persistence.AttributeConverter<? extends Enum<?>[],​? extends Number>>
    Converter to convert that converts the enumeration value.
    boolean
     
  • Element Details

    • converter

      Class<? extends javax.persistence.AttributeConverter<? extends Enum<?>[],​? extends Number>> converter
      Converter to convert that converts the enumeration value. If no converter is provided, the ordinal is taken.
      Default:
      com.sap.olingo.jpa.metadata.core.edm.annotation.EdmEnumeration.DummyConverter.class
    • isFlags

      boolean isFlags
      Default:
      false