Annotation Interface ConverterRegistration


Registers an AttributeConverter. The main purpose is to be able to control Converter.autoApply() external to the actual converter class, which might be useful for third-parties converters.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends AttributeConverter<?,?>>
    The converter class to register
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Should the registered converter be auto applied for converting values of its reported domain type?
    The domain type to which this converter should be applied.
  • Element Details

    • 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.

      With autoApply() set to true, this will effectively override converters defined with Converter.autoApply() set to false and auto-apply them.

      With autoApply() set to false, this will effectively override converters defined with Converter.autoApply() set to true and disable auto-apply for them.

      Default:
      void.class
    • autoApply

      boolean autoApply
      Should the registered converter be auto applied for converting values of its reported domain type?

      Defaults to true as that is the more common use case for this annotation.

      Default:
      true