Annotation Interface ODataField


@Target(FIELD) @Retention(RUNTIME) @Documented public @interface ODataField
Annotation to be used to link fields to their OData property as well as converting between the domain type of a field and the actually exposed type.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the OData property this field gets mapped to.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends TypeConverter<?,?>>
    The converter to be used to convert between the domain and the exposed type of the annotated field.
  • Element Details

    • odataName

      @Nonnull String odataName
      The name of the OData property this field gets mapped to.
      Returns:
      The name of the corresponding OData property.
    • converter

      @Nonnull Class<? extends TypeConverter<?,?>> converter
      The converter to be used to convert between the domain and the exposed type of the annotated field.
      Returns:
      The type of the converter to use for the annotated field.
      Default:
      com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.IdentityConverter.class