Annotation Interface Converter
A converter class must be annotated with the Converter annotation. If the autoApply element is specified as true, the persistence provider must automatically apply the converter to all mapped attributes of the specified target type for all entities in the persistence unit.
Note that Id attributes, version attributes, relationship attributes, and attributes explicitly annotated as Enumerated or Temporal will not be converted.
Note that if autoApply is true, the Convert annotation may be used to override or disable auto-apply conversion on a per-attribute basis.
If autoApply is false, only those attributes of the target type for which the Convert annotation has been specified will be converted.
If there is more than one converter defined for the same target type, the Convert annotation should be used to explicitly specify which converter to use.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
Whether to apply the converter automatically.
-
Element Details
-
autoApply
boolean autoApplyWhether to apply the converter automatically.- Default:
- false
-