Annotation Interface OptValue


@Retention(RUNTIME) @Target(FIELD) public @interface OptValue
Specifies a custom key for the annotated field. The annotated field's value must be castable to OptionalValue or null.

AutoSODatable will work with this annotation like this:
  • If the field's value is null, the field will be ignored when creating the SOData.
  • If the field's value is castable to OptionalValue, the optional's value will be added to the SOData, if it exists.
  • If the field's value is not castable to OptionalValue, AutoSODatable.getData() will throw a ClassCastException.
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    @NotNull String
     
  • Element Details

    • value

      @NotNull @NotNull String value
      Returns:
      The key that should be used for this field.