Package st.orm

Annotation Interface DbEnum


@Target({RECORD_COMPONENT,PARAMETER}) @Retention(RUNTIME) public @interface DbEnum
Specifies how an enum should be mapped when reading or writing to a column.

By default, enums are mapped using their Enum.name() value. Use @DbEnum(EnumType.ORDINAL) to explicitly indicate that the enum's ordinal value should be used instead.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The enum mapping strategy to apply.
  • Element Details

    • value

      EnumType value
      The enum mapping strategy to apply.
      Returns:
      the enum type strategy
      Default:
      NAME