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
    int
    Specifies the dimension of the column, usually relevant for multidimensional data.
    Specifies the key type of the column, typically used for mapping keys in key-value pairs.
    Specifies the similarity metric for the column.
    Specifies the type 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
    • type

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

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

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

      int dimension
      Specifies the dimension of the column, usually relevant for multidimensional data. Defaults to -1, indicating unspecified dimensions.
      Returns:
      the dimension value or -1 if not set
      Default:
      -1
    • metric

      Specifies the similarity metric for the column. Defaults to SimilarityMetric.COSINE.
      Returns:
      the similarity metric
      Default:
      COSINE