Package tech.ydb.yoj.databind
Annotation Interface CustomValueType
@Inherited
@Retention(RUNTIME)
@Target({TYPE,FIELD,RECORD_COMPONENT})
public @interface CustomValueType
Annotates the class, or entity field/record component as having a custom
The specified converter will be used by YOJ instead of the default (Database column↔Java field) mapping.
value converter.
The specified converter will be used by YOJ instead of the default (Database column↔Java field) mapping.
Annotation on entity field/record component has priority over annotation on the field's/record component's class.
This annotation is inherited, so make sure that your converter either supports all
possible subclasses of your class, or restrict subclassing by making your class final or sealed.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionClass<? extends Comparable>Exact type of value thatconverter'stoColumn()method returns.Simple value type that theconverter()represents a custom value type as.Class<? extends ValueConverter>Converter class.
-
Element Details
-
columnValueType
FieldValueType columnValueTypeSimple value type that theconverter()represents a custom value type as. Cannot beFieldValueType.COMPOSITEorFieldValueType.UNKNOWN. -
columnClass
Class<? extends Comparable> columnClass -
converter
Class<? extends ValueConverter> converterConverter class. Must have a no-args public constructor.
-