Annotation Interface SerId


@Target(FIELD) @Retention(RUNTIME) public @interface SerId
Annotate fields that should be persisted. Do not use in conjunction with 'transient'. Valid identifier values are positive values. Fields of a same class should have unique identifiers whose value should remain persistent across the class update history.

All instance fields of a serializable type should be marked either SerId or SerTransient.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    The field id value.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Optional value indicating if the field was deprecated.
    int
    Optional version attribute specifies in which version of the object the field was introduced.
  • Element Details

    • value

      int value
      The field id value. Must be greater than 0.
    • version

      int version
      Optional version attribute specifies in which version of the object the field was introduced. The default value if 0. If specified, the corresponding type should have an SerVersion annotation.
      Default:
      0
    • deprecated

      boolean deprecated
      Optional value indicating if the field was deprecated. Such fields are restored from, but *not* saved to, a JDB2.
      Default:
      false