@Target({TYPE,METHOD,FIELD})
@Retention(RUNTIME)
@Repeatable(TypeConverters.class)
public @interface TypeConverter
The TypeConverter annotation is used to specify an EclipseLink
TypeConversionConverter for modification
of the data value(s) during the reading and writing of a mapped attribute.
A TypeConverter must be uniquely identified by name and can be defined at the class, field and property level and can be specified within an Entity, MappedSuperclass and Embeddable class.
The usage of an TypeConverter is always specified via the Convert annotation and is supported on a Basic, or ElementCollection mapping.
- See Also:
- Author:
- Guy Pelletier
-
Element Details
-
name
String nameName this converter. The name should be unique across the whole persistence unit. -
dataType
Class<?> dataTypeSpecify the type stored on the database.The default is inferred from the type of the persistence field or property.
- Default:
void.class
-
objectType
Class<?> objectTypeSpecify the type stored on the entity.The default is inferred from the type of the persistent field or property.
- Default:
void.class
-