Annotation 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
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionint
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 nameSpecifies 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
ColumnTypes typeSpecifies 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 valueTypeSpecifies the value type of the column, typically used for complex data structures. If not provided, defaults toColumnTypes.UNDEFINED
.- Returns:
- the value type or
ColumnTypes.UNDEFINED
if not set
- Default:
UNDEFINED
-
keyType
ColumnTypes keyTypeSpecifies the key type of the column, typically used for mapping keys in key-value pairs. If not provided, defaults toColumnTypes.UNDEFINED
.- Returns:
- the key type or
ColumnTypes.UNDEFINED
if not set
- Default:
UNDEFINED
-
dimension
int dimensionSpecifies 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
SimilarityMetric metricSpecifies the similarity metric for the column. Defaults toSimilarityMetric.COSINE
.- Returns:
- the similarity metric
- Default:
COSINE
-