Annotation Interface Column


@Target(FIELD) @Retention(RUNTIME) public @interface Column
Annotation to define properties for a database column. This annotation can be used on fields to specify custom column names, types, and additional properties.

The Column annotation provides flexibility for mapping fields to database columns, with options to customize column name, type, and other attributes.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Specifies the name of the column.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the key type of the column, typically used for mapping keys in key-value pairs.
    Specifies the type of the column.
    Specifies the name of the column.
    Specifies the value type of the column, typically used for complex data structures.
  • Element Details

    • name

      String name
      Specifies the name of the column. If not provided, the field's name will be used.
      Returns:
      the custom column name or an empty string if not set
    • udtName

      String udtName
      Specifies the name of the column. If not provided, the field's name will be used.
      Returns:
      the custom column name or an empty string if not set
      Default:
      ""
    • type

      Specifies the type of the column. If not provided, the field's type will be used.
      Returns:
      the column type or TableColumnTypes.UNDEFINED if not set
      Default:
      UNDEFINED
    • valueType

      TableColumnTypes valueType
      Specifies the value type of the column, typically used for complex data structures. If not provided, defaults to TableColumnTypes.UNDEFINED.
      Returns:
      the value type or TableColumnTypes.UNDEFINED if not set
      Default:
      UNDEFINED
    • keyType

      Specifies the key type of the column, typically used for mapping keys in key-value pairs. If not provided, defaults to TableColumnTypes.UNDEFINED.
      Returns:
      the key type or TableColumnTypes.UNDEFINED if not set
      Default:
      UNDEFINED