Package org.hibernate.annotations
Annotation Type ConverterRegistration
-
@Target({TYPE,ANNOTATION_TYPE,PACKAGE}) @Retention(RUNTIME) @Repeatable(ConverterRegistrations.class) public @interface ConverterRegistration
Registers anAttributeConverter
. The main purpose is to be able to controlConverter.autoApply()
external to the actual converter class, which might be useful for third-parties converters.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean
autoApply
Should the registered converter be auto applied for converting values of its reported domain type?Class<?>
domainType
The domain type to which this converter should be applied.
-
-
-
Element Detail
-
converter
Class<? extends jakarta.persistence.AttributeConverter<?,?>> converter
The converter class to register
-
-
-
domainType
Class<?> domainType
The domain type to which this converter should be applied. This allows refining the domain type associated with the converter e.g. to apply to a subtype. WithautoApply()
set to true, this will effectively override converters defined withConverter.autoApply()
set tofalse
and auto-apply them. WithautoApply()
set to false, this will effectively override converters defined withConverter.autoApply()
set totrue
and disable auto-apply for them.- Default:
- void.class
-
-